collectiveidea / simple-maps
- Source
- Commits
- Network (2)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
bootstrap
| name | age | message | |
|---|---|---|---|
| |
Readme.textile | ||
| |
example.html | ||
| |
map.js |
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
- Sumo (javascript microformats parser)
- Prototype framework1
- The ability to write hCards (or copy them from the hCard Creator)
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.


