I would like to has mouse move event to show coordinate and followed this thread for map click event:Javascript API map 3.7 has no coordinates when handling map click
For some reasons, onMouseMove is totally not working at all and map click is working fine using the thread mentioned above. Here is my JSFiddler: Edit fiddle - JSFiddle
Is this another bug?
Thanks.
Hey May,
what isn't working exactly? Looking at your fiddle when I move my mouse over the map the coordinates change.
Tim
If you are using browser like chrome, firefox, and etc then it works but if you test it on different devices like iPhone, Andriod then mouse-move didn't seem to work.
Looks at the code on JSFiddler-
If I comment out this line map.on("mouse-move", showCoordinates) and replace it with this dojo.connect(map, "onMouseOver", showCoordinates1); that is similar to this thread for map click -Javascript API map 3.7 has no coordinates when handling map click
Instead of using map click, I would like to use mouse-move event on my mobile app.
Thank you.
I would add dojo/touch and update your coordinates on touch.press. That covers mouse-down when a mouse is present and touchstart when a touchscreen is in use.
There is a mouse-drag event. Maybe that's what needs to be set up if you determine that the visitor is using a smartphone?..
I try it still not working. ESRI sample here: Create Map Display Mouse Coordinates also not show on mobile devices.
Thanks.