|
POST
|
In case anybody else runs across this... We have an application that will load one of many different FeatureLayers at any given time, and one of those layers was throwing an error that said "Coordinate Quantization parameter specified is not correct". I ultimately traced this to the map service returning this in the metadata for the layer (i.e., part of what you see when you go to http://server/arcgis/rest/services/MyService/MapServer/0😞 "extent": {
"xmin": "NaN",
"ymin": "NaN",
"xmax": "NaN",
"ymax": "NaN",
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
}
} So there was a problem with the extent for the layer. I'm not sure why it was doing this, but this layer was a valid query layer with valid data, and the problem occured using ArcGIS Server 10.6.1 and JavaScript API 3.27. Whatever the case, there at least three possible solutions for this problem: 1) Somehow correct the problem causing the service to generate this info. This could possibly involve restarting and/or republishing the service. Depending on your organization (or if you're using data outside your organization), this might not be feasible or possible for you, especially if you need it working "now". 2) You could pass an undocumented property within the "options" argument of the FeatureLayer constructor with the name "quantize" and the value of false. For example: var layer = new FeatureLayer(url, {id:"myLayer",visible:true,quantize:false}); As mentioned in my case, the problematic layer was one of many, and I didn't necessarily want to disable quantization for them all, so this wasn't optimal. However, depending on your restrictions, this may be the only option you have. 3) If you have a locally hosted copy of the API, you can "fix" your copy of it. The reasoning is that (1) since it is possible for ArcGIS Server to return an invalid extent, then (2) the JavaScript API should handle that gracefully, but in its current state, it doesn't. By default, quantization is used (a) if it is enabled in the FeatureLayer object (see undocumented "quantize" parameter discussed in option 2 above, which defaults to true), and (b) if ArcGIS Server supports quantization for the layer in the map service. We can add an additional condition (c) that the extent object must also be valid, because quantization works only with a valid extent. This way, we won't waste network and server resources by sending requests we already know will fail. To do this, I opened the init.js file, and did a find (Ctrl-f) for this text: this.quantize&&this.supportsCoordinatesQuantization?("esriGeometryPolyline" ...and replaced it with this text: this.quantize&&this.supportsCoordinatesQuantization&&!isNaN(this.fullExtent.getHeight())&&!isNaN(this.fullExtent.getWidth())?("esriGeometryPolyline" I took the third option because it would've been a pain for me to troubleshoot the map service, and I didn't necessarily want to lose the benefits of quantization on "good" layers. And so now, the "problematic" layer works just fine.
... View more
01-31-2019
12:19 PM
|
4
|
0
|
2650
|
|
POST
|
Thank you for pointing this out...otherwise, we may never have known. It appears this was a new feature introduced in version 3.24. Neither the "What's New" page nor the documentation for UniqueValueRenderer make any mention of this change.
... View more
08-01-2018
10:37 AM
|
0
|
0
|
513
|
|
POST
|
In 3.x, you can do this by overriding the "_calculateClickTolerance" function of the map's popupManager property. For example: map.popupManager._calculateClickTolerance = function(graphicsLayers) {
return 10;
}; That is a very simplistic example, but you could implement whatever logic you want inside that function as long as you return an integer (preferably non-negative). The "graphicsLayers" parameter is an array of GraphicsLayer instances (this includes classes that inherit GraphicsLayer, like FeatureLayer). The returned value is the tolerance in pixels. The default implementation basically does this: for each SimpleRenderer, ClassBreaksRenderer, or UniqueValuesRenderer found in the input GraphicsLayer array, it looks at each symbol in the renderer and finds the one with the greatest offset value (this includes "xoffset" and "yoffset" values). If the greatest offset it finds is greater than 6, it returns that. Otherwise, it returns 6 by default.
... View more
07-18-2018
11:09 AM
|
0
|
0
|
2548
|
|
POST
|
I've missed a few releases here, but found the workaround is still necessary in 3.24. I've also found the problem only appears to manifest if the first layer added to the map is not a tiled layer (e.g. an ArcGISDynamicMapServiceLayer)...this is probably true of previous versions as well. Our workflow is to add a locally hosted layer first, and then add ESRI basemaps afterwards so that startup isn't dependent on a third party service. That first layer could be tiled or dynamic, depending on different circumstances, and the problem happens for the latter, but not the former.
... View more
05-07-2018
02:45 PM
|
0
|
0
|
2139
|
|
POST
|
The problem still occurs in version 3.24, using geodesicBuffer this time (see also attached image). I am not using third party modules. The fix appears to be the same: Look for (note that this was wrapped over two lines in my text editor): if(this.Pc||1E4<u.Ds&&1<u.Pj.length) Replace with: if((u)&&(this.Pc||1E4<u.Ds&&1<u.Pj.length)) Windows 10, IE 11 Parameters for geodesicBuffer: geometry (string representation; an actual Polygon instance was passed): "{"rings":[[[-17579866.91,2431821.3332],[-17579898.065899998,2431640.692400001],[-17579953.4001,2431648.533399999],[-17579955.833,2431635.3517999984],[-17580002.9127,2431644.161800001],[-17580004.8609,2431633.4224999994],[-17580024.7616,2431635.3834000006],[-17580029.1474,2431599.7437999993],[-17580055.357,2431604.640299998],[-17580035.3918,2431736.4585999995],[-17580027.1143,2431788.6972999982],[-17580007.9076,2431902.6317999996],[-17579983.056,2431899.3718999997],[-17579989.3852,2431863.747299999],[-17579983.7298,2431862.969900001],[-17579984.853,2431854.5929999985],[-17579920.7811,2431844.3082999997],[-17579922.2447,2431830.1493999995],[-17579866.91,2431821.3332]]],"spatialReference":{"wkid":102100,"latestWkid":3857}}" distance: 500 unit: 9002 unionResults: false
... View more
05-04-2018
10:47 AM
|
0
|
0
|
809
|
|
POST
|
I've missed a few releases, being busy with other things, but have found this is still an issue in 3.23. I haven't tried union this time around, but it happens with buffer. The workaround is still the same, although some variable names have changed. Look for if(this.Ec||1E4<u.jq&&1<u.Ci.length) Replace with if((u)&&(this.Ec||1E4<u.jq&&1<u.Ci.length))
... View more
01-16-2018
03:50 PM
|
0
|
3
|
2674
|
|
POST
|
Indeed, it is rather strange to see someone generating print output the hard way, and I too would recommend the PrintTask as well, since it will greatly simplify things. However, to just answer the question as it was presented, yes, you can pass multiple map service definitions to the ExportWebMap service. The operationalLayers parameter is an array, so by definition accepts any number of values: {
"mapOptions": {
/* etc, etc */
},
"operationalLayers": [
{
"id": "layer1",
"url": "http://whatever.com/arcigs/rest/services/service1/MapServer"
}, {
"id": "layer2",
"url": "http://whatever.com/arcigs/rest/services/service2/MapServer"
}, {
"id": "layer3",
"url": "http://someOtherSite.com/arcigs/rest/services/service74/MapServer"
}
],
"exportOptions": {
/* etc, etc */
},
"layoutOptions": {
/* etc, etc */
}
} The above code just shows the structure...there are many parameters I have not displayed just for simplicity.
... View more
10-19-2016
04:36 PM
|
1
|
0
|
375
|
|
POST
|
Robert - I understand that. In the spirit of reusability, please see a similar conversation here.
... View more
07-29-2016
12:59 PM
|
0
|
1
|
1317
|
|
POST
|
ESRI did not fix this bug in version 3.17 of the ArcGIS API for JavaScript.
... View more
07-29-2016
12:48 PM
|
0
|
3
|
1317
|
|
POST
|
Thanks Ken...I also have confirmed this is still an issue in 3.17.
... View more
07-29-2016
10:52 AM
|
0
|
0
|
2674
|
|
POST
|
There is another subtle bug in the measure tool related to the advanced location measurements. In some cases, which could be very common in our setup, The "measure-end" will fire once on the first mouse move if one of the advanced units is selected. This was also noticed in 3.17. The perceived intent of the advanced tools is that they shouldn't update on mouse move. The code is set up to detect that and turn the move handler off, but not until after the first time it fires. You can reproduce this in the sandbox (see above) by adding the advancedLocationUnits parameter to the constructor and running it. Then, expand the measure tool, click the Location tool, switch to MGRS, click a different tool (Distance or Area) and then click back on Location. Then move the mouse over the map...you will see the tool calculates the location of where the mouse cursor first intersected the map. The problem occurs in the _calculateLocation function You can fix the problem by changing the line: A&&this._mouseMoveMapHandler&&(c.disconnect(this._mouseMoveMapHandler),this._mouseMoveMapHandler=null); to if((A)&&(this._mouseMoveMapHandler)){c.disconnect(this._mouseMoveMapHandler);this._mouseMoveMapHandler=null;if(!a)return;}
... View more
07-29-2016
08:50 AM
|
0
|
0
|
1083
|
|
POST
|
A bug exists in the Measurement dijit of version 3.17 of the API. This could also exist is previous versions as well. Description: After obtaining a location value, you get nothing or a garbage value when switching the units to UTM, MGRS, or USNG. Conditions: 1) Your map's spatial reference is web mercator (may happen for other spatial references besides WGS 84 as well). 2) You create the measurement dijit with "advancedLocationUnits" set to true Steps to reproduce: (Note, you can reproduce this is in the measurement widget sample at https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_measurement if you also add the "advancedLocationUnits" parameter and set it to true in the constructor and then run the sample) 1) Click the "Location" tool of the widget 2) Click a point on the map so you see the output for the point 3) Switch the units to UTM, USNG, OR MGRS Note: This bug is not manifested if you select UTM, USNG, or MGRS and then click the point on the map. It is only where there is an existing point and you switch units. Example: If your original units are UTM, and you click a point, you get a good value. If you then re-select UTM in the units list, you get a garbage value for the same location. Diagnosis: There are different code paths taken when clicking on a point, or switching the dropdown list. The problem occurs in the _switchLocationUnit function, particularly in this line of code: "esriDegreeMinuteSeconds"===b||"esriDecimalDegrees"===b?(this._mouseMoveMapHandler=c.connect(this._map,"onMouseMove",this,"_locationMoveHandler"),this._toggleLocationResultsTable(!0,!1),this._locationGraphic&&this._calculateLocation(this._locationGraphic.geometry,!0)):(this._toggleLocationResultsTable(!1,!1),null===this.resultValue||null===this.markerLocationX&&null===this.markerLocationY||(a=this.markerLocationX,d=this.markerLocationY,this._locationGraphic&&this._updateGeocoordinateStringLocation({coordinates:[[a,
d]],sr:{wkid:4326},conversionType:this._unitStrings},this._locationGraphic.geometry))) Since that's difficult to comprehend, I've translated it (more or less) here: if ((b == "esriDegreeMinuteSeconds") || (b == "esriDecimalDegrees")) {
this._mouseMoveMapHandler = c.connect(this._map, "onMouseMove", this, "_locationMoveHandler");
this._toggleLocationResultsTable(true, false);
if (this._locationGraphic)
this._calculateLocation(this._locationGraphic.geometry, true);
} else {
this._toggleLocationResultsTable(false, false);
if ((this.resultValue !== null) && (this.markerLocationX !== null) && (this.markerLocationY !== null)) {
a = this.markerLocationX;
d = this.markerLocationY;
if (this._locationGraphic)
this._updateGeocoordinateStringLocation({coordinates:[[a,d]], sr:{wkid: 4326}, conversionType:this._unitStrings}, this._locationGraphic.geometry);
}
} Notice the call at the end to _updateGeocoordinateStringLocation...notice in particular the hard-coded value of the "sr" parameter {wkid:4326}. This is the problem...explanation below: When just clicking a point on the map, the workflow goes from _measureCustomPoint to _calculateLocation. This results in call to _updateMarkerLocation, where markerLocationX and markerLocationY are set to wm values of _userGeometry (the point the user clicked). In _calculateLocation, a copy of the geometry projected to wgs 84 is obtained, which then makes its way to _updateGeocoordinateStringLocation. This works because the coordinate values passed are in wgs 84. However, when changing the unit drop-down, the flow is a little different. This starts with a call to _switchLocationUnit, which, as you can see in the code, grabs the markerLocationX and markerLocationY values, which are in web mercator, but slaps a hard coded wkid of 4326 on them, saying they're wgs 84 instead. You can probably see where this is a problem. This is why you get nothing/garbage when switching to UTM, MGRS, or USNG. Prescription: You can do this yourself if you have a locally hosted copy of the API. The cause of the bug lies in the hard-coded value for sr (sr:{wkid: 4326}). I instead recommend changing it to sr:this._locationGraphic.geometry.spatialReference This is because the values of the _locationGraphic geometry are actually copied into markerLocationX and markerLocationY, which are the coordinates passed in the same call. See flow of _locationClickHandler -> _calculateLocation -> this._updateMarkerLocation
... View more
07-28-2016
08:13 AM
|
0
|
3
|
2298
|
|
POST
|
We too have this same issue with 10.3.1. We will be bypassing 10.4 for 10.5 later this year, and I do not see how changing registry settings or playing with third party software for IIS will fix this problem since it's coming from ArcGIS Server's web server Tomcat. Instead, the fix I found was to modify the configuration for the Tomcat server. Refer also to HOW TO -- Disable weak ciphers in Tomcat 7 & 8 - Powered by Kayako Help Desk Software for more information on the parameters mentioned below. Here are my instructions for Windows: 1) Make a backup copy of <ArcGIS_Server_Install_Directory>\framework\runtime\tomcat\conf\server.xml 2) Run Notepad as Administrator 3) Open <ArcGIS_Server_Install_Directory>\framework\runtime\tomcat\conf\server.xml 4) Near the bottom of the file, look for the line that starts with <Connector... 5) At the end of the line, between the last quotation mark and the slash, add a space, and then add the following text (you can see it's very long and will cause the lines to wrap, but that's ok): ciphers="TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_DSS_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,TLS_EMPTY_RENEGOTIATION_INFO_SCSVF" 6) Save the file and restart ArcGIS Server
... View more
07-25-2016
10:48 AM
|
0
|
0
|
1592
|
|
POST
|
The current scheduled date is January 1, 2019. See also http://downloads.esri.com/support/product%20life%20cycle/online_gis/ArcGISWebMappingAPIs_PLC.pdf
... View more
06-24-2016
11:02 AM
|
1
|
0
|
656
|
|
POST
|
Yes, looking at it more closely, you're better off setting up the API locally and tweaking the one file. Trying the inline fix actually gets pretty nasty...those two functions are full of required modules...for example, in _legendRequestServer, I can see that: c = dojo/_base/lang l = dojo/json d = dojo/_base/array w = esri/request There's more in the _buildRow_Tools function as well. It's possible to work with this, but very ugly, so I wouldn't recommend it. I apologize for sending you down that trail without fully thinking it through.
... View more
05-23-2016
09:46 AM
|
0
|
1
|
604
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-09-2025 09:35 AM | |
| 2 | 12-09-2025 09:06 AM | |
| 1 | 11-26-2025 12:29 PM | |
| 3 | 11-26-2025 09:11 AM | |
| 1 | 10-02-2025 01:14 PM |