New jQuery Plug-in
Published Tuesday 4th of January 2011
I recently wrote a little plug-in that helps with creating progressively enhanced Google maps.
The way it works is that you, as a user, create a static Google map using the Google Static Maps API and then simply run the plug-in on a parent-element of said static map which will in turn replace the static map with a dynamic one.
Setting up a static map is as simple as creating an img element and setting the src attribute to the static map API's URL:
<img src="http://maps.google.com/maps/api/staticmap?center=59.33961,18.080712&zoom=15&size=440x200&sensor=false&markers=59.33961,18.080712" alt="" />
Doing it this way assures even users without JavaScript gets a map and you only have to do it once. The plug-in reads the attributes found in the src of the img and generates the JS-map based on those.
It's still in beta and doesn't support everything but do have a look.
- Tags
- Comments
- No comments
Bookmark this Article