Working with touch
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access