Integrating Google Maps with Yahoo Geo-Coding

May 2006 Blogged by Allan Tan

At ideyatech, Google Map Sample Imagewe have recently integrated an application with Google Maps to graphically display key locations. The process is quite simple. Google made Javascript APIs that can be easily integrated with existing codes. Amazingly, this nifty feature can be implemented with less than 15 lines of code.

The first step is to sign up for the API key. This generates a key string that will be included in your script to serve as your identity. Afterwards, update your page to include the necessary javascripts. This is generally an easy task for intermediate programmers. I’d rather not explain the code as Google made reasonable efforts to document the API. It took me about 15 mins to get the sample code running, a few hours to customize the page and integrate with our database. Viola!

One issue was upon us though, Google maps require latitude and longitude information about the locations. Our database contain only address information. What we need is a geo-coding functionality that can translate a physical address into long/lat. There are some open-source projects for geo-coding, but the best we have tested is Yahoo Maps. How ironic, we’re using Yahoo Maps for geo-coding which will be fed to Google maps for viewing.

The process of using Yahoo Maps API is quite simple too. First step is to sign-up for an application ID. Then construct a REST command to issue the query. The syntax is well documented, too. So, the solution is to provide a lat/long “lookup” button within your data entry screen. For usability, we applied Ajax codes to perform the on-the-fly lookup. Due to some security issues with the browser connecting directly to yahoo maps URL, we ended up calling our server which in turn makes the request to Yahoo URL. Here is the js script that makes the call and here is Java code snippet that process the request.

Now, the solution is complete. We have Google maps to display the graphical maps based on lat/long stored in the database and Yahoo geo-coding to translate a physical address to lat/long. This is what I call Web 2.0 integration.



Related Posts with Thumbnails

Thanks for rating this! Now tell the world how you feel - .
How does this post make you feel?
  • Excited
  • Fascinated
  • Amused
  • Bored
  • Sad
  • Angry

4 Responses to “Integrating Google Maps with Yahoo Geo-Coding”

  1. May 16, 2006  -  7:57 pm
    Karl

    Is this available for a Philippine setup?

  2. May 17, 2006  -  12:29 am
    allanctan

    Project was implemented for a US client. Google Map does not provide street level maps of Manila, but Mapquest does.

  3. June 2, 2006  -  12:07 am
    Berto

    wouldn’t it be simpler if you did this all in yahoo instead of using two sites?

  4. June 3, 2006  -  7:42 am
    allanctan

    yes, definitely. During the time, Google Maps has more advanced GUI Mapping functionalities and yahoo was plain map. I think the latest Yahoo Maps has been improved to match Google maps functionalities. Cheers!

Leave a Reply

© 2014 Ideyatech, Inc — All Rights Reserved.