Tuesday, June 7, 2011

Google Maps Without the Scripting

Thursday, February 21, 2008at10:50:00 AM

Posted by Tom Manshreck, Maps API Team

If you're a regular reader of this blog, you probably already use the Google Maps API and love it as much as we do! But you may find it not useful for certain cases: the Google Maps API requires JavaScript, can take a while to load over slow connections, and requires some overhead to maintain a dynamic website.

The Google Static Maps API provides a simpler way to add maps to your website. Rather than use JavaScript, the Google Static Maps API creates map images on the fly via simple requests to the Static Maps service with HTTP requests. No JavaScript, no overhead. Just create a special URL as the src attribute within an tag and let the Static Maps service create your image.

To see how easy the Static Maps API is to use, note the image below:

This image was created using the following simple tag:

(Note that you will need to replace the key parameter above with your own Maps API key. You can obtain a free key at http://code.google.com/apis/maps/signup.html)

When this blog post was displayed in your browser, the URL in the tag was sent to the Static Maps service, which constructed an image based on the parameters passed in that URL. Voila! You can create maps up to 512 x 512 pixels, and at any zoom level or location on the face of the earth that Google Maps supports. You can even place markers on your map images! This Static Maps Wizard lets you play around with some of the options.

The Static Maps API is especially useful for pages in which you want a map to load quickly. You can even replace the generated Static Map with a JavaScript Maps API map after the page loads, allowing a seamless transition from a quick-loading map to a fully dynamic implementation.

Because the map generated by the Static Maps API is an image, you can also send it to your friends as an email attachment (especially handy for planning your next party!) or display it on any cell phone browser, whether or not it supports JavaScript.

Full documentation on constructing maps with the Static Maps API is available at:

http://code.google.com/apis/maps/documentation/staticmaps/index.html

As always, please post questions in the Maps API forum.

Permalink

Newer PostOlder PostHome Site Feed
Add to Google

More Blogs from GoogleVisit our directory for more information about Google blogs.ArchivesArchivesMay (9)April (6)March (6)February (7)January (7)December (6)November (5)October (7)September (7)August (6)July (9)June (11)May (7)April (8)March (7)February (5)January (4)December (1)November (5)October (3)September (6)August (3)July (3)June (5)May (4)April (7)March (5)February (3)January (1)December (3)November (2)We Love Feedback

Discuss the Maps API in the official discussion group, or contact us if you have any questions about this blog.

LinksGoogle CodeGoogle Maps APIDocumentationDiscussion GroupWhat We're ReadingGoogle Maps ManiaGoogle SightseeingGoogle Earth BlogMore Google Dev Blog PostsRead more...
Google Maps API Blog is powered by Blogger. Start your own weblog.

Powered By Blogger Copyright © 2008 Google Inc. All rights reserved.
Privacy Policy | Terms of Service

No comments:

Post a Comment