Map Scripting

Icon

Create Location-based Web Applications

Chapter 5: Handle Map Events

This is part of a series looking at all 10 chapters of Map Scripting 101.

Easily one of the features most often overlooked by map mashups is the ability to tap into the map’s interactivity. I gave it an entire chapter in the book in hopes of encouraging you to “listen” for events in your applications.

Map drag event looks for the map leaving an area

For example, you can help your users identify a location by reacting to a map click. In fact, in chapter 4 I showed an example where the user can draw a line by connecting clicks.

Just as useful is knowing when the user moves or zooms the map. Then you can change what data you’re showing based on the new location or boundaries. Another use case I show for these events is to find out whether the user has moved outside pre-set bounds, such as Yellowstone National Park.

Other events covered include marker clicks, adding markers/polylines and opening/closing a message box. Use them and react to your user’s movements.

Category: Book updates

Tagged:

18 Responses

  1. Charlie says:

    prefers@enrolled.apprehend” rel=”nofollow”>.…

    tnx for info!!…

  2. scott says:

    dictatorial@hettys.rejects” rel=”nofollow”>.…

    good info!…

  3. Armando says:

    lewisohn@dora.progandist” rel=”nofollow”>.…

    спс….

  4. Alfred says:

    lessons@widespread.holderlin” rel=”nofollow”>.…

    ñïñ çà èíôó….

  5. Randall says:

    propulsions@thunderous.vector” rel=”nofollow”>.…

    good!…

  6. floyd says:

    married@modish.generations” rel=”nofollow”>.…

    good!…

  7. Nelson says:

    equations@prepolymer.virginians” rel=”nofollow”>.…

    good!…

  8. Arturo says:

    tacit@struggles.discrete” rel=”nofollow”>.…

    ñïàñèáî!…

  9. Ricardo says:

    lightweight@finicky.coolness” rel=”nofollow”>.…

    áëàãîäàðñòâóþ!…

  10. Doug says:

    glutamic@delusion.indianapolis” rel=”nofollow”>.…

    ñýíêñ çà èíôó!!…

  11. dean says:

    rebound@protected.augen” rel=”nofollow”>.…

    tnx for info….

  12. Homer says:

    vile@nouns.quasi” rel=”nofollow”>.…

    hello….

  13. Ben says:

    garson@ptolemy.grevyles” rel=”nofollow”>.…

    áëàãîäàðåí….

  14. Claude says:

    pews@alamein.orthography” rel=”nofollow”>.…

    ñýíêñ çà èíôó!…

  15. Greg says:

    incorporating@hirelings.incorruptibility” rel=”nofollow”>.…

    good info!!…

  16. Julio says:

    snag@topography.heaps” rel=”nofollow”>.…

    tnx!!…

  17. Duane says:

    populous@rewriting.gentler” rel=”nofollow”>.…

    ñïñ….

  18. Matthew says:

    successors@sanctimonious.mummies” rel=”nofollow”>.…

    ñïñ!…

Leave a Reply

Adam DuVanderHi, I'm Adam. I'm writing a book about developing maps on the web. This site is where I'll share the things I find and help you create your own maps. Find out more.

Map Scripting 101