Chapter 5. HANDLE MAP EVENTS

image with no caption

Web-based maps are highly interactive. They make users want to drag them, click them, and zoom them. That's all part of the fun, but this interactivity also makes them more useful. By tapping into this interactivity, you can design those little user movements to provide an even better interface; for instance, changing the visible markers when users drag the map or changing the search radius along with the zoom level.

Events control all the potential ways a user can interact with your map. You can run special code any time a user drags the map, zooms in, or clicks. Events are also specific to markers, message boxes, and ...

Get Map Scripting 101 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.