Hello there,
I would like to add a feature layer to my map. When I do that, I noticed from the json that the coordinates returned by the server has unnecessary decimal precision. My feature service has Web Mercator projection (in meters) and when I used it as a FeatureLayer, it return coordinate up to 11 decimals like this: [13259971.983800001,572641.27050000057]. This makes the json response output size almost doubled and I think I can load my map faster by removing the unnecessary decimals.
I'm aware that through Query class, we can set geometryPrecision parameter to define decimals of coordinates that we want, but the part that I'm really lost is I dont know how to set this through FeatureLayer when its loaded for the first time to the map? I mean when I define a feature layer and would like to add it to the map like this:
var featureLayer = new FeatureLayer("https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0");
map.addLayer(featureLayer);
I noticed that the map.addLayer() function will execute a query to server for the first time to load the FeatureLayer that I dont know how to include geometryPrecision parameter to that query.
Thank you very much in advance and any help would be very appreciated.
Best,
Agus