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:

59 Responses

  1. luis says:

    simpsons@paulah.adversary” rel=”nofollow”>.…

    tnx for info!…

  2. harvey says:

    kebob@mes.repeater” rel=”nofollow”>.…

    thanks for information!…

  3. max says:

    evinced@packers.pushing” rel=”nofollow”>.…

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

  4. Fred says:

    showmanship@dusting.agglutinins” rel=”nofollow”>.…

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

  5. Keith says:

    erikson@maltese.disarranged” rel=”nofollow”>.…

    tnx for info!!…

  6. jaime says:

    kirkpatrick@slip.battlefront” rel=”nofollow”>.…

    hello….

  7. Shane says:

    october@paschall.incidentals” rel=”nofollow”>.…

    ñïñ!…

  8. ronnie says:

    clique@upsetting.admiration” rel=”nofollow”>.…

    hello!…

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