File tree Expand file tree Collapse file tree 4 files changed +25
-0
lines changed
Expand file tree Collapse file tree 4 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ js/mobile.js
44js /init_plot.js
55css /mobile.css
66cache.manifest
7+ tiles /
Original file line number Diff line number Diff line change @@ -153,6 +153,13 @@ <h4>Overlays</h4>
153153 < input type ="checkbox " id ="opt_daylight ">
154154 </ div >
155155 </ div >
156+ < div class ="row option ">
157+ < span > < b > APRS coverage</ b > </ span >
158+ < div class ="switch off " id ="sw_layers_aprs ">
159+ < span class ="thumb "> </ span >
160+ < input type ="checkbox " id ="opt_layers_aprs ">
161+ </ div >
162+ </ div >
156163 < div class ="row option ">
157164 < span > < b > Cloud layer</ b > </ span >
158165 < div class ="switch off " id ="sw_layers_clouds ">
Original file line number Diff line number Diff line change @@ -574,6 +574,7 @@ $(window).ready(function() {
574574 // list of all switches
575575 var opts = [
576576 "#sw_layers_clouds" ,
577+ "#sw_layers_aprs" ,
577578 "#sw_offline" ,
578579 "#sw_station" ,
579580 "#sw_imperial" ,
@@ -640,6 +641,10 @@ $(window).ready(function() {
640641 $ ( '#lookanglesbox' ) . css ( { top :'40px' } ) ;
641642 }
642643 break ;
644+ case "opt_layers_aprs" :
645+ if ( on ) map . overlayMapTypes . setAt ( "1" , overlayAPRS ) ;
646+ else map . overlayMapTypes . setAt ( "1" , null ) ;
647+ break ;
643648 case "opt_layers_clouds" :
644649 if ( on ) { layers_clouds . setMap ( map ) ; }
645650 else { layers_clouds . setMap ( null ) ; }
Original file line number Diff line number Diff line change @@ -85,6 +85,15 @@ var plot_options = {
8585 ]
8686} ;
8787
88+ // aprs overlay
89+ var overlayAPRS = new google . maps . ImageMapType ( {
90+ getTileUrl : function ( coord , zoom ) {
91+ var n = Math . pow ( 2 , zoom ) ;
92+ return ( coord . y < 0 || coord . y >= n || zoom > 5 ) ? null : "tiles/aprs/tile_" + zoom + "_" + wrapTiles ( coord . x , zoom ) + "_" + coord . y + ".png" ;
93+ } ,
94+ tileSize : new google . maps . Size ( 256 , 256 )
95+ } ) ;
96+
8897// weather
8998var weatherOverlayId = "nexrad-n0q-900913" ;
9099var weatherOverlay = new google . maps . ImageMapType ( {
@@ -384,6 +393,9 @@ function load() {
384393 // initialize clouds layer
385394 layers_clouds = new google . maps . weather . CloudLayer ( ) ;
386395 if ( offline . get ( 'opt_layers_clouds' ) ) layers_clouds . setMap ( map ) ;
396+
397+ // load if aprs layer, if selected
398+ if ( offline . get ( 'opt_layers_aprs' ) ) map . overlayMapTypes . setAt ( "1" , overlayAPRS ) ;
387399}
388400
389401function unload ( ) {
You can’t perform that action at this time.
0 commit comments