Sha256: 880f31031326ddc2de16674f4263cd391939192f81b6f0dce9072676fffdb977
Contents?: true
Size: 1.5 KB
Versions: 5
Compression:
Stored size: 1.5 KB
Contents
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Twhere</title> <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=changeme" type="text/javascript"> </script> <script type="text/javascript"> function initialize() { if(GBrowserIsCompatible()) { function createMarker(latlng, name) { var marker = new GMarker(latlng); marker.value = name; GEvent.addListener(marker,"click", function() { map.openInfoWindowHtml(latlng, name); }); return marker; } var points = new Array(); <% for location, latlng in @locations %> points["<%= location %>"] = new GLatLng(<%= latlng %>); <% end %> var map = new GMap2(document.getElementById("map"), {mapTypes: [G_PHYSICAL_MAP]}); <% for location, tweets in @located_tweets %> <% text = tweets.sort {|a, b| -(a[:twitter_id].to_i <=> b[:twitter_id].to_i) }.map {|t| t[:text]}.join("<br />") %> map.addOverlay(createMarker(points["<%= location %>"], "<h1><%= location %></h1><p><%= text %></p>")); <% end %> map.setCenter(points["center"], 13); map.setUIToDefault(); } } </script> <style> * { border: 0px; margin: 0px; padding: 0px; } html, body { width: 100%; height: 100%; } </style> </head> <body onload="initialize()" onunload="GUnload()"> <div id="map" style="width: 100%; height: 100%"></div> </body> </html>
Version data entries
5 entries across 5 versions & 1 rubygems