|
|
distancetool = new MVDistanceTool(MVDistanceTool.IMPERIAL) ;
mapview.addDistanceTool(distancetool);
distancetool.setEventListener("new_shape_point",getDistanceOrd);
distancetool.setEventListener("finish",finishAction);
distancetool.setEventListener("modify",getDistanceOrd);
The JavaScript code that activates the distance tool is listed below.
<a href="javascript:distancetool.init();">Click here</a> to activate the distance tool and then start drawing on the map.