We have a custom JavaScript API based application that loads an ArcGIS Online Webmap from our organization and lets the user edit the shapes of polygons in a specific layer. Initially, the polygons all cover a specific area, and there are no gaps in between them. The application loads the Editor Dijit, and configurations plus event handlers limit the Editor Dijit to the following:
Problem: When the user cuts a polygon, the two pieces look okay. But when the two features are selected and merged, the new polygon is displaced by two to three pixels in some random direction. The merged shape is maintained, but it looks like it slid over a little bit. This creates gaps and overlaps in the polygons where there weren't any before. When we look at the data in ArcMap, we see the same gaps and overlaps in the edited polygon. While the displacement appears to be a couple pixels off, that translates to about 10 foot gaps in our data.
For right now, we don't have a topology on these features, since the extra checks and balances they add reduce the performance of other operations.
Any suggestions? I'll be happy to post bits of my code when I have time.
Solved! Go to Solution.
Oops, forgot to note the answer after further investigation.
The changes to the feature class shape after merging were due to projection differences. The web map, which used ESRI base map layers, was in Web Mercator, while the edited data was in a State Plane projection. Once base maps were switched out so both the map and the edited layer were in the same State Plane projection, gaps showed much less frequently (apart from accidentally dragging parcels a pixel or two over while selecting them).
Word to the wise: Mind your projections, especially while editing.
Hi Ken, thanks for posting!
I have some questions:
Any code snippets are also much appreciated.
Thanks Jonathan,
To answer your questions:
I'll post some snippets in the morning, once I have access to my machine.
As a side note, we confirmed that the spatial reference of the data matched the spatial reference of the basemap behind it (Ohio State Plane). We thought we fixed the issue before when the map used the Web Mercator basemaps provided by ArcGIS Online. Now the issue has creeped up again.
Thanks Ken!
As strange as this may sound, I'm glad this is not an IE exclusive issue
Do you have any additional details about how this issue was fixed previously and what was the root cause?
Are you using mouse events or drag events for map interaction?
Code always welcome!
Oops, forgot to note the answer after further investigation.
The changes to the feature class shape after merging were due to projection differences. The web map, which used ESRI base map layers, was in Web Mercator, while the edited data was in a State Plane projection. Once base maps were switched out so both the map and the edited layer were in the same State Plane projection, gaps showed much less frequently (apart from accidentally dragging parcels a pixel or two over while selecting them).
Word to the wise: Mind your projections, especially while editing.