diff options
author | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2010-06-14 21:42:52 +0000 |
---|---|---|
committer | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2010-06-14 21:42:52 +0000 |
commit | 8d41e6e5626fa88b42b13bb61e389e18d8a4d8d7 (patch) | |
tree | 3ba6fd451c035eb606aba600c5daaa1bc4e4735e /templates/includes/map_entry_list_template.html | |
parent | c5a6d45415c7601f9a515d05a61ee795dc37536b (diff) |
fixed ie8 js issues
Diffstat (limited to 'templates/includes/map_entry_list_template.html')
-rw-r--r-- | templates/includes/map_entry_list_template.html | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/templates/includes/map_entry_list_template.html b/templates/includes/map_entry_list_template.html index 206430a..aae8950 100644 --- a/templates/includes/map_entry_list_template.html +++ b/templates/includes/map_entry_list_template.html @@ -1,6 +1,33 @@ {% 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 @@ -75,33 +102,10 @@ function initialize() { }); //function to handle click event and display single info window function openWin(content, marker) { - infowindow.close() + infowindow.close(); infowindow.setContent(content); infowindow.open(map,marker); - } -} -// 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; + }; + + } |