Hi, I'm using the edit tools to Move the feature(GeometryType is Point) on the FeatureLayer. When I activate the Edit.MOVE, I want to set a fance for the point graphic.
I notice the "graphic-move" event of Edit can get the moving graphic point, and the geometryEngine also identify the spatial relationship between the graphic and the fance polygon.
But how to display on the map or graphic layer, so that the move point only located inside the fance area?
bufferGeometry = results.features[0].geometry;
editTools.on("graphic-move", function(evt)
{
var graphic = evt.graphic;
var geometry = graphic.geometry;
if (geometryEngine.within(geometry, bufferGeometry))
{
// do nothing
} else
{
// the current position is outside the fance, go back to the previous
}
});
In the circumstances, the highlight graphic should be along the boundary.