O'Reilly logo

Map Scripting 101 by Adam DuVander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required