Home > unobtrusive-google-maps

unobtrusive-google-maps

Unobtrusive-google-maps is a project mainly written in ..., it's free.

jQuery plugin. Unobtrusively load interactive Google maps on top of static JPEG Google maps.

--~~ Unobtrusive Google Maps ~~--

Loads interactive Google maps when a static JPEG map
is clicked. The static map is replaced with a div. The
div is filled with a regular interactive Google map.

    Demo: http://f.augustl.com/2011/unobtrusive_google_maps/

--~~ Usage ~~--

Download the javascript: http://github.com/augustl/unobtrusive-google-maps/raw/master/unobtrusive-google-maps.jquery.js

Include the javascript on your page.

In your HTML (without the line break slashes):

In your javascripts:

$(".static_map").unobtrusiveGoogleMaps();

--~~ Why? ~~--

You want your page to load fast. So you use static maps. You
don't need dynamic and interactive maps until a user actually
clicks the map, and loading the entire Google maps stack when
your page loads makes your page slower. What if the user didn't
want to click your Google map at all? He just spent all that
time loading Google maps for nothing.
Previous:NaphthaBase