Add HOT layer to the main page

This commit is contained in:
Tom Hughes 2013-09-23 17:50:06 +01:00
parent 4e214746c6
commit b756c5fd6e
4 changed files with 18 additions and 0 deletions

View file

@ -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) {

View file

@ -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")
})
];

View file

@ -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

View file

@ -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'],