Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
kjohnsonGIS
@kjohnsonGIS
Hey, no worries! it seems generally cacheBust is working for all other requests to js files, when i look in chromes dev tools network, i see all the files have the ?1.0.1 appended to them but for epsg.io request it ends up like https://epsg.io/102709.js&1.0.1 which it doesn't like but adding the ? fixes it
Tim McGee
@tmcgee
@kjohnsonGIS I'm not sure why it is adding & to the url instead of ?
That is the surprise to me
When I use cacheBust it adds ?1.01.
kjohnsonGIS
@kjohnsonGIS
yeah not sure.. maybe something with the require?
oh!
Tim McGee
@tmcgee
NOTE: in my test I am not using StreetView widget and so no calls to epsg.io
kjohnsonGIS
@kjohnsonGIS
oh ok, im only seeing the issue in the street view widget, no where else
Tim McGee
@tmcgee
espg.io is also used in the MapInfo widget
Can you try using cacheBust:'?1.0.1?
It will add ?? to most urls which should be fine. might result in &? for epsg.io which I guess would still break
kjohnsonGIS
@kjohnsonGIS
ok thanks, just tried that, but the url to epsg still got the & put in front, but wierdly for that request only one ?.. all the other requests have ??1.0.1
Tim McGee
@tmcgee

@kjohnsonGIS I think this might be a better fix specific to the StreetView widget and others that use epsg.io:

var key = this.proj4Catalog + ':' + String(wkid);
if (!proj4.defs[key]) {
    var url = this.proj4CustomURL || this.proj4BaseURL + String(wkid) + '.js';
    require({cacheBust: false}, [url], lang.hitch(this, 'getStreetView', evt, true));
    return;
}

NOTE the additional first parameter sent to require()

kjohnsonGIS
@kjohnsonGIS
oh ok Nice!!
Tim McGee
@tmcgee
no. not so nice it appears.
it stops adding the 1.0.1 parameter from that point forward for all requests.
kjohnsonGIS
@kjohnsonGIS
oh, yeah thats not good
Tim McGee
@tmcgee
@kjohnsonGIS I have tried a few other ideas and your original approach is better than any of them.
Tim McGee
@tmcgee

@kjohnsonGIS : Capturing for future reference but maybe you can test to be sure.

This appears to work when placed in index.html(not app.js). With this additional function, the cacheBust property is not required.

window.dojoConfig = {
    locale: locale,
    async: true,
    fixupUrl: function (url) {
        return url + '?1.0.1';
    }
};

This function is supported in dojo but not well documented.

Tim McGee
@tmcgee
@kjohnsonGIS Are you using a proxy or anything else that might be including a ? somewhere else in the url? That's one way to accidentally break the dojo code for using the cacheBust property and the only reason I can see why it would add & instead of ?. The function above circumvents that check but still imperfect.
kjohnsonGIS
@kjohnsonGIS
@tmcgee thanks for all your help! I'll try adding that function in the index.html dojoConfig and let you know. I am using esri's proxy app for that epsg.io url.
i think your right that that's causing the problem. Other urls that I'm proxying work fine, but maybe because when something is appended to the url in other cases, its actually adding parameters?
Tim McGee
@tmcgee

that's likely the problem then - a compatibility issue with the Esri proxy and cacheBust parameter that confuses espg.io (and potentially other urls that you do not happen to be accessing)

You might want to consider changing your configuration so the esri proxy is only used for certain domains and not others (like epsg.io). That can be done in viewer.js using esri/urlUtils. That's generally a good idea overall though I also recognize that it may not be possible /practical in your implementation.

kjohnsonGIS
@kjohnsonGIS
ok thanks, yeah we have to keep all browser requests within our system, but maybe i can self host that epsg file.. it looks pretty small!
Tim McGee
@tmcgee
I was going to recommend that self-hosted approach. That would definitely solve your issue.
kjohnsonGIS
@kjohnsonGIS
:thumbsup: Happy New Years! cmv is an amazing application!
ERS-Long
@ERS-Long
Can’t agree more, patiently waiting for the version for js api 4.x. (:)) Happy New Year to All!
Tim McGee
@tmcgee
Happy New Year to all CMV-ers everywhere. It brings me such great joy that CMV continues to provide much value and benefit to you all. Cheers to many interesting and exciting years ahead for the CMV community.
mayur9785
@mayur9785
Happy new year to all!
absolutely CMV is an amazing application!
gisfinder
@gisfinder
Happy new year , the guys using CMV.
triesco
@triesco
Any plans for cmv to work with arcgis js 4.x ??
Steve
@cuthberts
Is there a way to make the template picker of the Editor widget more then 3 columns wide? Perhaps set to auto depending on how big i make the widget frame?
Santiago Utsumi
@santiagoutsumi
Hi somebody there to help with the following
I use GitHub to make a custom web map using QGIS2Web that worked fine but now would like to visualise atribute tables for selected lyears and then to export tables as CVS file. Any help welcome. I am not a codeing guy....
Tim McGee
@tmcgee
@triesco Yes I have worked on several approaches for including the v4.x API in CMV: 1) dojo-based like we do with v3 (CMV supporting both 3 and 4) and 2) components for use React (v4x only). Both of these have been in use by several of my clients for quite awhile. Consistent with my past efforts, both were created using funding from the client for their projects with the specific intent that the work on CMV will ultimately be released as open source for use by all CMV users and developers. It is taking much longer to get that public release than I had wished but it will occur. I hesitate to provide any time frame for the release because I have said coming soon several times in the past and have been wrong so I won't say it now. Sorry I can't be more specific at this time.
Tim McGee
@tmcgee
@cuthberts Esri's Template Picker widget includes parameters for the number of columns and rows. I have used them successfully in custom widgets I have built. I am pretty sure you can pass those parameters along with the Esri Editor widget and you'd need to create your own widget. This is something I always recommend for editing because the Esri Editor widget doesn't provide acceptable flexibility of the Editing experience for the users or the developers.
Tim McGee
@tmcgee
@santiagoutsumi Your project is using Leaflet not the Esri JavaScript API. The Attributes Table widget is dependent on the Esri API so may be very difficult to integrate into your project. I suggest you look for a different components that will work with Leaflet.
Denverino
@Denverino
Hi everybody. I have a trouble with my cmv. My editor widget don't save any edits in arcsde database. But i don't see any errors, what i missed?
Tim McGee
@tmcgee
@Denverino This is always a challenge to determine the root cause. Most often it has to do with issues in the Feature Service. And the error messages at the REST end point rarely provide enough detail to easily get to the bottom of it. First see if you can edit features through the Feature Service using ArcGIS Desktop. If not, then you have problem with the service. If you can save edits, then there's something missing in your configuration of the Editor widget. I avoid that widget so don't have specific direction on what might be missing.
Tim McGee
@tmcgee
Others here that use that widget may be able to share some tips and tricks.
Denverino
@Denverino
Hmm, it is interesting. I did't edit feature service in the Desktop anytime.
Denverino
@Denverino
@tmcgee yes, you are right! My services don't editable, because in there are in mxd file 2 connections to different arcsde db, but both use one postgresql user account.
triesco
@triesco
Is there a eay to edit in the attribute table in CMV?
Denverino
@Denverino
@tmcgee hi. I use the rest service without identify possibility, only json query. Can identify widget cmv use json requests to view attribute info of the mapService?
Or may be i don't understand what i need to identify(
Tim McGee
@tmcgee
@Denverino For Dynamic layers, the Identify widget uses the Identify task of the Map Service (not querying the individual sub layers). For Feature layers (from a Feature Service or a single sub layer of a Map Service), the rest service is not queried at all - the attributes are associated with the graphics features on the map. Does this not work for you?
Denverino
@Denverino
@tmcgee Yes, it does not work for me. I have some Feature layers in Map Service.
Current version 10.31 of the arcgis rest services
Tim McGee
@tmcgee
All that you describe should work without issue. Many folks are using cmv successfully with feature layers and 10.3.1. Sounds like maybe there may be a problem with your cmv configuration.
Denverino
@Denverino
It works fine with my own rest 10.0 services