collectiveidea / simple-maps

Add Google Maps in seconds. Maps any and all hCards on the page and resizes the map to fit. Uses the new Google Maps JavaScript API v3. It will even do the geocoding for you!

This URL has Read+Write access

name age message
file Readme.textile Loading commit data...
file example.html
file map.js
Readme.textile

Simple Maps!

Google Maps should be easy to add anywhere. Simply mark up your content with hCards and we’ll put them on a map.

Requirements

Example

<pre> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> <script src="/javascripts/prototype.js" type="text/javascript"></script> <script src="/javascripts/sumo/microformat.js" type="text/javascript"></script> <script src="/javascripts/sumo/hcard.js" type="text/javascript"></script> <script src="/javascripts/simple-maps/map.js" type="text/javascript"></script>

Coffee Shops

Lemonjello’s

61 East Ninth Street Holland, Michigan 49423

http://www.lemonjellos.com phone: 616-928-0699 <!-- this one has geo data --> 42.789537, -86.104624

JP’s Coffee & Espresso Bar

57 East Eighth Street Holland, Michigan 49423

http://www.jpscoffee.com phone: 616-396-5465 fax: 616-396-0219 <!-- this one doesn't have geo data, so it gets looked up on the fly! -->

TODO

  • Remove dependency on prototype1
  • More configurable

1 Note: prototype.js is only used for loading the map on page load (last 5 lines of map.js). Simply replace this, or call Map.display() on your own to remove the dependency.