mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Merge pull request #5851 from cillian/osm-tile-provider-updates
Open Street Map tile provider updates
This commit is contained in:
@@ -17,7 +17,7 @@ module Api
|
||||
end
|
||||
|
||||
def open_street_map_provider_options
|
||||
ContentConfig.open_street_map_provider_options.to_json
|
||||
ContentConfig.open_street_map_provider_options
|
||||
end
|
||||
|
||||
def open_street_map_default_latitude
|
||||
|
||||
123
vendor/assets/javascripts/leaflet-providers.js
vendored
123
vendor/assets/javascripts/leaflet-providers.js
vendored
@@ -219,66 +219,16 @@
|
||||
}
|
||||
},
|
||||
CyclOSM: {
|
||||
url: 'https://dev.{s}.tile.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
|
||||
url: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 20,
|
||||
attribution: '<a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> | Map data: {attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
OpenMapSurfer: {
|
||||
url: 'https://maps.heigit.org/openmapsurfer/tiles/{variant}/webmercator/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
variant: 'roads',
|
||||
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> | Map data '
|
||||
},
|
||||
variants: {
|
||||
Roads: {
|
||||
options: {
|
||||
variant: 'roads',
|
||||
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
Hybrid: {
|
||||
options: {
|
||||
variant: 'hybrid',
|
||||
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
AdminBounds: {
|
||||
options: {
|
||||
variant: 'adminb',
|
||||
maxZoom: 18,
|
||||
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
ContourLines: {
|
||||
options: {
|
||||
variant: 'asterc',
|
||||
maxZoom: 18,
|
||||
minZoom: 13,
|
||||
attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>'
|
||||
}
|
||||
},
|
||||
Hillshade: {
|
||||
options: {
|
||||
variant: 'asterh',
|
||||
maxZoom: 18,
|
||||
attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>, <a href="http://srtm.csi.cgiar.org/">SRTM</a>'
|
||||
}
|
||||
},
|
||||
ElementsAtRisk: {
|
||||
options: {
|
||||
variant: 'elements_at_risk',
|
||||
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Hydda: {
|
||||
url: 'https://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 18,
|
||||
maxZoom: 20,
|
||||
variant: 'full',
|
||||
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> — Map data {attribution.OpenStreetMap}'
|
||||
},
|
||||
@@ -288,18 +238,73 @@
|
||||
RoadsAndLabels: 'roads_and_labels'
|
||||
}
|
||||
},
|
||||
MapBox: {
|
||||
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}',
|
||||
Jawg: {
|
||||
url: 'https://{s}.tile.jawg.io/{variant}/{z}/{x}/{y}{r}.png?access-token={accessToken}',
|
||||
options: {
|
||||
attribution:
|
||||
'<a href="https://www.mapbox.com/about/maps/" target="_blank">© Mapbox</a> ' +
|
||||
'<a href="http://jawg.io" title="Tiles Courtesy of Jawg Maps" target="_blank">© <b>Jawg</b>Maps</a> ' +
|
||||
'{attribution.OpenStreetMap}',
|
||||
minZoom: 0,
|
||||
maxZoom: 22,
|
||||
subdomains: 'abcd',
|
||||
variant: 'jawg-terrain',
|
||||
// Get your own Jawg access token here : https://www.jawg.io/lab/
|
||||
// NB : this is a demonstration key that comes with no guarantee
|
||||
accessToken: '<insert your access token here>',
|
||||
},
|
||||
variants: {
|
||||
Streets: 'jawg-streets',
|
||||
Terrain: 'jawg-terrain',
|
||||
Sunny: 'jawg-sunny',
|
||||
Dark: 'jawg-dark',
|
||||
Light: 'jawg-light',
|
||||
Matrix: 'jawg-matrix'
|
||||
}
|
||||
},
|
||||
MapBox: {
|
||||
url: 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}{r}?access_token={accessToken}',
|
||||
options: {
|
||||
attribution:
|
||||
'© <a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> ' +
|
||||
'{attribution.OpenStreetMap} ' +
|
||||
'<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>',
|
||||
subdomains: 'abcd',
|
||||
id: 'mapbox.streets',
|
||||
tileSize: 512,
|
||||
maxZoom: 18,
|
||||
zoomOffset: -1,
|
||||
id: 'mapbox/streets-v11',
|
||||
accessToken: '<insert your access token here>',
|
||||
}
|
||||
},
|
||||
MapTiler: {
|
||||
url: 'https://api.maptiler.com/maps/{variant}/{z}/{x}/{y}{r}.{ext}?key={key}',
|
||||
options: {
|
||||
attribution:
|
||||
'<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',
|
||||
variant: 'streets',
|
||||
ext: 'png',
|
||||
key: '<insert your MapTiler Cloud API key here>',
|
||||
tileSize: 512,
|
||||
zoomOffset: -1,
|
||||
minZoom: 0,
|
||||
maxZoom: 21
|
||||
},
|
||||
variants: {
|
||||
Streets: 'streets',
|
||||
Basic: 'basic',
|
||||
Bright: 'bright',
|
||||
Pastel: 'pastel',
|
||||
Positron: 'positron',
|
||||
Hybrid: {
|
||||
options: {
|
||||
variant: 'hybrid',
|
||||
ext: 'jpg'
|
||||
}
|
||||
},
|
||||
Toner: 'toner',
|
||||
Topo: 'topo',
|
||||
Voyager: 'voyager'
|
||||
}
|
||||
},
|
||||
Stamen: {
|
||||
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.{ext}',
|
||||
options: {
|
||||
@@ -719,11 +724,11 @@
|
||||
}
|
||||
},
|
||||
FreeMapSK: {
|
||||
url: 'http://t{s}.freemap.sk/T/{z}/{x}/{y}.jpeg',
|
||||
url: 'https://{s}.freemap.sk/T/{z}/{x}/{y}.jpeg',
|
||||
options: {
|
||||
minZoom: 8,
|
||||
maxZoom: 16,
|
||||
subdomains: '1234',
|
||||
subdomains: 'abcd',
|
||||
bounds: [[47.204642, 15.996093], [49.830896, 22.576904]],
|
||||
attribution:
|
||||
'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 <a href="http://freemap.sk">Freemap.sk</a>'
|
||||
|
||||
Reference in New Issue
Block a user