Is there any way to force a featurelayer to never generalize and/or quantize the geometries in the layer? I am asking because I'm doing a lot of geometryengine operations on a featurelayer and sometimes I get tiny slivers as output from the engine. Seemingly this is caused by tiny differences in the geometries depending on zoom level etc. In version 3 of the api we had setMaxAllowableOffset and autoGeneralize props as means to control this but in version 4 I cannot find it.
There doesn't appear to be a means of disabling the quantization via layer settings, but using a RequestInterceptor to remove the quantizationParameters from the queries to the server should work for most common implementations:
var featureLayer = new FeatureLayer({ url: "https://server/path/etc/FeatureServer/0" }); esriConfig.request.interceptors.push({ url: featureLayer.url + "/" + featureLayer.layerId + "/query", before: function (params) { if (params.requestOptions.query.quantizationParameters) delete params.requestOptions.query.quantizationParameters; } }); map.add(featureLayer);
Joel, question how we could address this same issues with an internal ArcGIS Server 10.9.1 hosted featurelayer. Thank you for any input you may have.
ESRI states:
Known Limitations
Only supported with ArcGIS Online hosted services or ArcGIS Enterprise 10.6.1 services.
As far as I know, the same approach mentioned above would work. Can you add a link to the ESRI documentation you mentioned?
https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html#quantizationParameters
Thank you.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.