Easily display route length?

4457
15
06-08-2015 08:41 AM
BenCamp
New Contributor III

Is there an easy way to modify this sample to display the route length?  I've been working on this for a couple days and can't seem to get the length to display.  Thanks in advance for your help.

Simple Routing

0 Kudos
15 Replies
TimWitt2
MVP Alum

Use Tom's approach then and move line 107 to line 103 and also on line 104 replace routeLength[0] with just routeLength

0 Kudos
BenCamp
New Contributor III

Thanks guys. I just put 'feet' in there as a placeholder as my app will be in feet. I'm not sure about the ESRI sample.

0 Kudos
BenCamp
New Contributor III

I assume that it's in meters but using the web mercator projection so all the measurements are fubar

0 Kudos
TomSellsted
MVP Regular Contributor

It may be a difference between a geodesic measure and planar, but I am only guessing!

Regards,

Tom

0 Kudos
BAXTERQ_ANDREWS
New Contributor III

Hi Idaho! Me Bronco!

BenCamp
New Contributor III

BAXTER Q ANDREWS wrote:

Hi Idaho! Me Bronco!

Go Vandals!

0 Kudos