mirror of https://github.com/aredn/aredn.git
update: Change the nodes default map tile server URL away from MapBox (#527)
This commit is contained in:
parent
d06bbaac2a
commit
31492676dc
|
@ -10,4 +10,4 @@ config usb
|
||||||
config map
|
config map
|
||||||
option leafletjs 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js'
|
option leafletjs 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js'
|
||||||
option leafletcss 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css'
|
option leafletcss 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css'
|
||||||
option maptiles 'http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiazVkbHEiLCJhIjoiY2lqMnlieTM4MDAyNXUwa3A2eHMxdXE3MiJ9.BRFvx4q2vi70z5Uu2zRYQw'
|
option maptiles 'http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg'
|
||||||
|
|
|
@ -23,4 +23,4 @@ config button
|
||||||
config map
|
config map
|
||||||
option leafletjs 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js'
|
option leafletjs 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js'
|
||||||
option leafletcss 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css'
|
option leafletcss 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css'
|
||||||
option maptiles 'http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiazVkbHEiLCJhIjoiY2lqMnlieTM4MDAyNXUwa3A2eHMxdXE3MiJ9.BRFvx4q2vi70z5Uu2zRYQw'
|
option maptiles 'http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg'
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#check for old default map tiles and change to the new map tiles if req'd
|
||||||
|
#will not change existing custom entries.
|
||||||
|
OLDTILES='http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiazVkbHEiLCJhIjoiY2lqMnlieTM4MDAyNXUwa3A2eHMxdXE3MiJ9.BRFvx4q2vi70z5Uu2zRYQw'
|
||||||
|
NEWTILES='http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg'
|
||||||
|
MAPTILESERVER=$(/sbin/uci -c /etc/config.mesh get aredn.@map[0].maptiles)
|
||||||
|
if [ "$MAPTILESERVER" = "$OLDTILES" ]; then
|
||||||
|
/sbin/uci -c /etc/config.mesh set aredn.@map[0].maptiles="$NEWTILES"
|
||||||
|
/sbin/uci -c /etc/config.mesh commit aredn
|
||||||
|
fi
|
||||||
|
exit 0
|
|
@ -48,7 +48,7 @@ push @setting, {
|
||||||
key => "aredn.\@map[0].maptiles",
|
key => "aredn.\@map[0].maptiles",
|
||||||
type => "string",
|
type => "string",
|
||||||
desc => "Specifies the URL of the location to access map tiles",
|
desc => "Specifies the URL of the location to access map tiles",
|
||||||
default => "http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiazVkbHEiLCJhIjoiY2lqMnlieTM4MDAyNXUwa3A2eHMxdXE3MiJ9.BRFvx4q2vi70z5Uu2zRYQw"
|
default => "http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg"
|
||||||
};
|
};
|
||||||
push @setting, {
|
push @setting, {
|
||||||
key => "aredn.\@map[0].leafletcss",
|
key => "aredn.\@map[0].leafletcss",
|
||||||
|
|
|
@ -1245,8 +1245,8 @@ print <<EOF;
|
||||||
{
|
{
|
||||||
maxZoom: 18,
|
maxZoom: 18,
|
||||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
||||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
'<a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>, ' +
|
||||||
'Imagery ©<a href="http://mapbox.com">Mapbox</a>',
|
'Imagery ©<a href="http://stamen.com">Stamen Design</a>',
|
||||||
id: 'mapbox.streets'
|
id: 'mapbox.streets'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue