Select to view content in your preferred language

Feature geometry vs Popup graphic geometry

846
1
11-15-2013 10:30 AM
RyanClancy
Frequent Contributor
What is the popup doing to my geometry? It appears to be rounding coordinates to whole numbers. I'm using JSAPI 3.7.

When I retrieve a feature from the server via a query the geometry looks like this:

{"paths":[[[2254219.6886,9307566.589100003],[2314023.484099999,9268954.027900003],[2407213.6961999983,9205433.806999996]]],"spatialReference":{"wkid":102100,"latestWkid":3857}}


...but when I use the default Popup behavior (i.e. user clicks on feature, feature is associated with Popup and highlighted with a graphic) the graphic.geometry for the exact same feature looks like this:

{"paths":[[[2254220,9307567],[2314023,9268954],[2407214,9205434]]],"spatialReference":{"wkid":102100,"latestWkid":3857}}


...in other words the Popup graphic is rounding the coordinates to whole numbers. Why? Can I override this somehow? I want to use the geometry of popup.getSelectedFeature() as a spatial parameter for a query to another service but don't get the expected results because of rounded coordinates.
0 Kudos
1 Reply
RyanClancy
Frequent Contributor
Bump.

Is this behavior intentional or accidental? I don't see a situation where I'd want less precise coordinates in my graphic geometry.
0 Kudos