Add HOT layer to the main page
This commit is contained in:
parent
4e214746c6
commit
b756c5fd6e
4 changed files with 18 additions and 0 deletions
|
@ -22,6 +22,8 @@ window.onload = function () {
|
|||
new L.OSM.TransportMap().addTo(map);
|
||||
} else if (args.layer == "mapquest") {
|
||||
new L.OSM.MapQuestOpen().addTo(map);
|
||||
} else if (args.layer == "hot") {
|
||||
new L.OSM.HOT().addTo(map);
|
||||
}
|
||||
|
||||
if (args.marker) {
|
||||
|
|
|
@ -48,6 +48,12 @@ $(document).ready(function () {
|
|||
code: "Q",
|
||||
keyid: "mapquest",
|
||||
name: I18n.t("javascripts.map.base.mapquest")
|
||||
}),
|
||||
new L.OSM.HOT({
|
||||
attribution: copyright + ". Tiles courtesy of <a href='http://hot.openstreetmap.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>",
|
||||
code: "H",
|
||||
keyid: "hot",
|
||||
name: I18n.t("javascripts.map.base.hot")
|
||||
})
|
||||
];
|
||||
|
||||
|
|
|
@ -2131,6 +2131,7 @@ en:
|
|||
cycle_map: Cycle Map
|
||||
transport_map: Transport Map
|
||||
mapquest: MapQuest Open
|
||||
hot: Humanitarian
|
||||
layers:
|
||||
header: Map Layers
|
||||
notes: Map Notes
|
||||
|
|
9
vendor/assets/leaflet/leaflet.osm.js
vendored
9
vendor/assets/leaflet/leaflet.osm.js
vendored
|
@ -39,6 +39,15 @@ L.OSM.MapQuestOpen = L.OSM.TileLayer.extend({
|
|||
}
|
||||
});
|
||||
|
||||
L.OSM.HOT = L.OSM.TileLayer.extend({
|
||||
options: {
|
||||
url: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
||||
maxZoom: 20,
|
||||
subdomains: 'abc',
|
||||
attribution: "Tiles courtesy of <a href='http://hot.openstreetmap.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>"
|
||||
}
|
||||
});
|
||||
|
||||
L.OSM.DataLayer = L.FeatureGroup.extend({
|
||||
options: {
|
||||
areaTags: ['area', 'building', 'leisure', 'tourism', 'ruins', 'historic', 'landuse', 'military', 'natural', 'sport'],
|
||||
|
|
Loading…
Add table
Reference in a new issue