Select to view content in your preferred language

Snapping bug in 2.4 version

657
2
08-10-2011 12:29 AM
MatejVrtich1
Occasional Contributor
I have found a bug in snapping functionality with the following error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.esri.ags.tools::DrawTool/checkForSnapping()
at com.esri.ags.tools::DrawTool/map_mouseMoveFirstHandler()

Yes, the version of ArcGIS API for Flex is 2.4.
This problem occurs if there is any Graphic object with null geometry in any GraphicsLayer in the Map. If this happens, the snapping does not work.

You can reproduce this problem using MXML attached.

Regards,
Matej Vrtich
Tags (2)
0 Kudos
2 Replies
SarthakDatt
Frequent Contributor
Hi Matej,

Thanks for reporting this.
In general, we don't have to check for geometry being null on a graphic as it is not rendered. Snapping is one case where we might 'interact' with a graphic and hence makes sense to check for the geometry always(at least not throw an error).

Will put in a fix for this.
0 Kudos
DanielBaternik
Deactivated User
Hi Sarthak,

Any idea when we will get a fix for this? This is also an issue for us.

Snapping is a core part of my projects UI work-flow and to be honest it is missing many capabilities (at least from what i have found). Its great but we need support for:

- Snapping to line \ polygon edges, not just nodes.
- Specifying exactly which layers the user can snap to
- Forcing the user to only draw(create) geometries that snap those 'snappable layers' and;
- Enabling snapping to be on by default without the user having to hit CTRL.

Any thing like this in the pipeline?

Thanks 🙂
0 Kudos