MeasureAction showing NaN

1416
0
03-29-2012 12:56 AM
Labels (1)
AvnerKashtan
New Contributor II
Hey there.

I've a button on my map that invokes a MeasureAction in PolyLine mode - each click starts a new line starting from the current position, with the line length displayed alongside.
One problem, though: if I click on the map to start a new line, but don't move the mouse, the MeasureAction shows "NaN" for the line length (you'll have to trust me that the screenshot is showing the Hebrew for "Not a Number". :)). While it's true that a line I haven't extended yet doesn't have a length, I think NaN is a really unclear thing to show a user. I would like to change it to a 0, or even not show the length at all until there's a valid value for it.

[ATTACH=CONFIG]13093[/ATTACH]

I poked around in the MeasureAction documentation, but couldn't find any extensibility/templating hooks like there are in other controls, to allow me to control the presentation. Is there a way to do so with today's 2.4 API release?
0 Kudos
0 Replies