diff options
author | Mark Wells <mark@freeside.biz> | 2016-04-21 12:07:29 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-04-26 12:10:50 -0700 |
commit | 1d50ab91a52be49724771accae7cc82740e83956 (patch) | |
tree | d91ef3f72c7f268b48f734e190109388d932591d /httemplate/search/elements/gmap.html | |
parent | 9fe9b2f47608e1ea7387539a77a95023f9872bdf (diff) |
generate sector coverage maps with Splat, checkpoint, #37802
Diffstat (limited to 'httemplate/search/elements/gmap.html')
-rw-r--r-- | httemplate/search/elements/gmap.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/httemplate/search/elements/gmap.html b/httemplate/search/elements/gmap.html index 8b070ebf9..632a32338 100644 --- a/httemplate/search/elements/gmap.html +++ b/httemplate/search/elements/gmap.html @@ -1,5 +1,6 @@ <%args> @features +@overlays </%args> <%doc> Generic Google Maps front end. @@ -24,6 +25,14 @@ Generic Google Maps front end. } }, # end of feature ], + overlays => [ + { url => 'https://localhost/freeside/view/sector_overlay-png.html?102', + west => -130.0, + east => -128.0, + south => 10.0, + north => 12.0, + }, # make a ground overlay + ], &> </%doc> @@ -54,6 +63,7 @@ body { height: 100%; margin: 0px; padding: 0px } <script type="text/javascript"> var data_geojson = <% encode_json($tree) %>; +var data_overlays = <% encode_json(\@overlays) %>; var baseStyle = { clickable: true, @@ -75,6 +85,7 @@ var featureStyle = function(feature) { }; var map; +var overlays; function initMap() { var canvas = $('#map_canvas'); map = new google.maps.Map(canvas[0], { zoom: 6 }); @@ -116,6 +127,14 @@ function initMap() { } }); // addListener() + + data_overlays.forEach(function(x) { + var url = x.url; + delete x.url; + var overlay = new google.maps.GroundOverlay( url, x ); + overlay.setMap(map); + overlays.push(overlay); + }); } $().ready( initMap ); |