If you're used to working with mouse events in JavaScript, touch events can be a bit confusing. The touchstart
and touchend
events look equivalent to the mousedown
and mouseup
events.
In current versions of the ArcGIS JavaScript API, many of the touch events are already handled by the API modules. When working with the map, you don't need to assign a map.on("touchstart")
event listener on top of a map.on("click")
event listener. The map.on("click")
event listener handles it for you. The same goes for any Dojo widgets and controls. That's one less thing you have to do to make your application mobile-ready.
Speaking of the map, there are touch events available that make some navigation tools obsolete. You can pinch or spread your fingers on the screen to zoom in and out respectively. Panning can be controlled by dragging your finger across the map. These actions remove the need for zoom in, zoom out, and pan buttons, which can free up valuable screen real estate.