remove OSM fallback since it's broken
This commit is contained in:
parent
ad5e610cec
commit
b3fbf89f57
@ -223,26 +223,14 @@
|
|||||||
case "config":
|
case "config":
|
||||||
var config = json.value;
|
var config = json.value;
|
||||||
if (!map) $.getScript("https://maps.googleapis.com/maps/api/js?key=" + config.google_maps_api_key).done(function(){
|
if (!map) $.getScript("https://maps.googleapis.com/maps/api/js?key=" + config.google_maps_api_key).done(function(){
|
||||||
var mapTypeId = config.google_maps_api_key ? 'roadmap' : 'OSM';
|
|
||||||
|
|
||||||
map = new google.maps.Map($('.openwebrx-map')[0], {
|
map = new google.maps.Map($('.openwebrx-map')[0], {
|
||||||
center: {
|
center: {
|
||||||
lat: config.receiver_gps.lat,
|
lat: config.receiver_gps.lat,
|
||||||
lng: config.receiver_gps.lon
|
lng: config.receiver_gps.lon
|
||||||
},
|
},
|
||||||
zoom: 5,
|
zoom: 5,
|
||||||
mapTypeId: mapTypeId
|
|
||||||
});
|
});
|
||||||
|
|
||||||
map.mapTypes.set("OSM", new google.maps.ImageMapType({
|
|
||||||
getTileUrl: function(coord, zoom) {
|
|
||||||
return "https://maps.wikimedia.org/osm-intl/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
|
|
||||||
},
|
|
||||||
tileSize: new google.maps.Size(256, 256),
|
|
||||||
name: "OpenStreetMap",
|
|
||||||
maxZoom: 18
|
|
||||||
}));
|
|
||||||
|
|
||||||
$.getScript("static/lib/nite-overlay.js").done(function(){
|
$.getScript("static/lib/nite-overlay.js").done(function(){
|
||||||
nite.init(map);
|
nite.init(map);
|
||||||
setInterval(function() { nite.refresh() }, 10000); // every 10s
|
setInterval(function() { nite.refresh() }, 10000); // every 10s
|
||||||
|
Loading…
Reference in New Issue
Block a user