From 37ca84e1f55e14b87b1f8d9e02e81d9b55efca85 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 14 Oct 2012 22:29:43 -0400 Subject: moved and modified a few templates --- design/templates/archives/map_data.html | 111 ++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 design/templates/archives/map_data.html (limited to 'design/templates/archives/map_data.html') diff --git a/design/templates/archives/map_data.html b/design/templates/archives/map_data.html new file mode 100644 index 0000000..a58de05 --- /dev/null +++ b/design/templates/archives/map_data.html @@ -0,0 +1,111 @@ +{% load typogrify %} +{% load truncateletters %} +{% load slugify_under %} + + // center on a country + function focusCountry(latitude, longitude, zoom) { + map.setZoom(zoom); + map.panTo(new google.maps.LatLng(latitude, longitude)); + }; + + {% for route in route_list %} + var {{route.template_var_name}} = [ + {% for point in route.geometry.coords%} + new google.maps.LatLng({{point.1}}, {{point.0}}){% if forloop.last%}{%else%},{%endif%} + {% endfor %} + ]; + {% endfor %} + function showRoute(route, zoom, latitude, longitude) { + var routePath = new google.maps.Polyline({ + path: eval(route), + strokeColor: "#FF0000", + strokeOpacity: 1.0, + strokeWeight: 2 + }); + map.setZoom(zoom); + map.panTo(new google.maps.LatLng(latitude, longitude)); + routePath.setMap(map); + return false; + }; +var map; +function initialize() { + + //custom marker + var image = new google.maps.MarkerImage('http://luxagraf.net/media/img/marker-entry.png', + new google.maps.Size(15, 26), + new google.maps.Point(0, 0), + new google.maps.Point(7, 26) + ); + //custom marker shadow + var shadow = new google.maps.MarkerImage('http://luxagraf.net/media/img/shadow.png', + new google.maps.Size(37, 34), + new google.maps.Point(0,0), + new google.maps.Point(8, 34) + ); + + + //check for a permalink + var location = window.location.hash; + //find a centerpoint + var pts = new Array(); + {%for c in country_list%}pts[{{forloop.counter0}}] = ["#{{c.slug}}", {{c.lat}},{{c.lon}},{{c.zoom_level}}];{% endfor %} + {%for c in region_list%}pts[pts.length] = ["#{{c.slug}}", {{c.lat}},{{c.lon}},{{c.zoom_level}}];{% endfor %} + if (location.length>1) { + for (i=0;i