Log

View Options

Making a World... Map

12/23/10

Google Maps no longer supports this interface configuration...

At work I was given the task of making a world map that will display information in various area based on latitude and longitude. This was quite a challenge as I had no real idea how to translate latitude and longitude into (x, y) points on a map. Lucky with the help of Wikipedia and Gerben Robijn I was able to get my latitude and longitude algorithm working rather accurately. Here is my modified version of Gerben's code, I say modified because it does the same thing but uses more efficient math processing methods.

Snipt.net is dead. Replace link to "http://snipt.net/embed/7c4dddff27428f81a5d2770fb4aba3f5"

Use this map to see how well it works; you can enter points on the map using the menu at the bottom. Note this is a Mercator style world map.

If you played with the zoom you might have noticed (or not) how it maintains the center of your viewing area when you zoom in and out. This was much trickier to pull off that I had anticipated and this time the internet provided no good clues or examples.

Snipt.net is dead. Replace link to "http://snipt.net/embed/c9af775ef5963dca8ac8a7f75adbc757"

Well, I wanted to share that map and those two functions because they were both rather difficult to come across and hopefully this will help some of you out there. If you want to know more about any of the methods I am using here, send me an e-mail or something of that sort. Cheers!