On Google Maps

Let me preface this post with: Google Rules. I’d work for them in a second. Their products are outstanding, leaders in their field. Google Maps is included in this opinion.

I’ve recently begun playing with the APIs for Maps, and I’m blown away. They’ve made this about as easy as it can be. There are two BIG pieces that are not exposed, and I’m more than a little disappointed.

1) Geocoding – I’d really like the ability to translate an address into latitude and longitude points. I’ve found other services that will provide that for me, but it would be nice to have a one-stop shop in Google Maps. I am currently using a free geocoding API at http://emad.fano.us/blog/?p=277 to determine this data.

2) Point to Point Directions – Google Maps currently allows you to draw lines on their maps, but there’s not a good way to determine what the points for each turn of a trip is. Being able to create custom maps from Point A to Point B would be incredibly powerful.

Anyways, here’s the code you need to get your very own map up and running. The only catch is that you’ll need to generate your own API key at: http://www.google.com/apis/maps.

<div id=”map” style=”width: 500px; height: 400px”></div>
<script src=”http://maps.google.com/maps?file=api&v=1&key=YourKeyHere&#8221; type=”text/javascript”></script>
<script language=”javascript”>
//
var map = new GMap(document.getElementById(“map”));
map.addControl(new GSmallMapControl());
map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4);
//
</script>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s