Map Scripting


Create Location-based Web Applications

Chapter 3: Geocoding

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

Geocoding, converting addresses and city names into coordinates to place on the map, is such an important part of mapping, it’s hard to believe Google Maps launched without the feature. Now there are many geocoding services available, both within mapping APIs and from additional services, both free and paid. There’s also a greater need for reverse geocoders, which take a point on the map and return something human readable, like an address.

Geocoding an address

The book covers four types of geocoders:

  1. Forward geocoding in JavaScript
  2. Forward geocoding server-side
  3. Reverse geocoding in JavaScript
  4. Reverse geocoding server-side

Reverse geocoders are becoming more popular because of mobile browsers. While in the past we almost always received our users’ locations from an address they type in, now we’re often receiving it directly, such as with the iPhone geolocation code, a standard that works across many browsers (including many desktop browsers). Coordinates help make coding easier, but sometimes you need to share with users where you think they are. Users don’t understand latitude/longitude, but they do understand addresses.

Reverse geocoding in Foursquare

In addition to geocoding services, the book covers postal code databases. It is common for sites in the U.S. to request the user’s zip code, which is faster to type and less invasive than a full address. You can pass that off to a geocoding service to convert a code to, usually, the center of the postal code area. Or, you can install a postal code database yourself and not have to worry about building on top of another service, at least for postal code queries, which are fairly easy to identify.

Category: Book updates


12 Responses

  1. scott says:

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

    good info!…

  2. Armando says:

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


  3. mike says:

    analeptic@juliet.spoils” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  4. shane says:

    owls@stewed.noncommissioned” rel=”nofollow”>.…

    good info!!…

  5. Lawrence says:

    executive@hob.czarina” rel=”nofollow”>.…

    tnx for info!…

  6. lonnie says:

    jalopy@moiseyev.souci” rel=”nofollow”>.…


  7. Timothy says:

    assure@equalizers.mervin” rel=”nofollow”>.…

    tnx for info….

  8. clarence says:

    bathrobe@abortion.wqxr” rel=”nofollow”>.…


  9. eugene says:

    yarder@unbreakable.inert” rel=”nofollow”>.…

    спасибо за инфу….

  10. brandon says:

    fernery@shareholder.efforts” rel=”nofollow”>.…

    thanks for information….

  11. Clyde says:

    pitched@nob.slimmer” rel=”nofollow”>.…

    спс за инфу….

  12. Marion says:

    prosodic@takings.tornadoes” rel=”nofollow”>.…

    tnx for info….

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