Using Draw tool as a "measuring stick"

550
3
03-28-2012 01:49 AM
Salomon_VágadalJoensen
New Contributor III
I'm trying to figure out how to use the Draw toolset in this sample as a "measuring stick":

http://help.arcgis.com/en/webapi/javascript/arcgis/demos/toolbar/toolbar_draw.html

What I'm trying to accomplish is that a user will be able to see the distance on the map from a starting point to the end point.

What I already know is that this can be accomplished with a point-to-point distance measurement using the map method toScreen to get the coordinates and then simply calculating the distance (using our old friend Pythagoras) between the two points, but I'm at a loss how to do this with the Draw toolset.
0 Kudos
3 Replies
JeffPace
MVP Alum
I'm trying to figure out how to use the Draw toolset in this sample as a "measuring stick":

http://help.arcgis.com/en/webapi/javascript/arcgis/demos/toolbar/toolbar_draw.html

What I'm trying to accomplish is that a user will be able to see the distance on the map from a starting point to the end point.

What I already know is that this can be accomplished with a point-to-point distance measurement using the map method toScreen to get the coordinates and then simply calculating the distance (using our old friend Pythagoras) between the two points, but I'm at a loss how to do this with the Draw toolset.


Instead of reinventing, is there a reason you are not using the measurement tool?
0 Kudos
Salomon_VágadalJoensen
New Contributor III
I didn't even know of the existence of the measurement tool 😕

I've implemented it, and it works fine, except for one thing: How can I use other measurement units than the standard choices. I'm particularly thinking of using nautical miles.
0 Kudos
JeffPace
MVP Alum
I didn't even know of the existence of the measurement tool 😕

I've implemented it, and it works fine, except for one thing: How can I use other measurement units than the standard choices. I'm particularly thinking of using nautical miles.


Unfortuantely it doesnt look like the measurement tool supports nautical miles, although i am not sure why.  Maybe ESRI can comment on that.
0 Kudos