AnsweredAssumed Answered

Using measurement widget does not interact very well with mouse events

Question asked by neocan99 on Aug 2, 2012
Latest reply on Feb 19, 2014 by amarsden
Hi there,

I'm using the measurement widget in a JavaScript API application, but the users find the response from mouse events awkward. These are the issues I'm running into:
1. Too often you click on the map, but it seems like the map does not detect the click.
2. When you do a click on the map you should stop the mouse, wait a second and then click, otherwise it thinks like you are panning. Not sure if it's related to item 1. I have deactivated Panning on the map, so it doesn't pan anymore, but we still have to wait for a moment before clicking on the map. The sample from ESRI behaves totally this way: if you do a small drag while selecting the polygon or line vertices, the map gets locked to an endless panning behavior. I wonder if there's a way to change some setting or prevent other click events from being triggered.
3. The tool buttons behave inconsistently: you perform area or length measures one after the other, but for the location tool you need to click on the button every time you want to use it again. This is, the location tool deactivates automatically, whereas the length and area tools don't.
4. The tool buttons are actually toggle buttons: if you click them again they deactivate. How can I change that so they stay active until something else gets activated?
5. Would it be possible somehow access a tool activate event?

We are using IE8 and IE9. Should I rather switch to use the Draw toolbar y do the calculations by myself?