if (params.layers.indexOf(map.dataLayer.options.code) >= 0) {
map.addLayer(map.dataLayer);
}
+
+ if (params.layers.indexOf(map.gpsLayer.options.code) >= 0) {
+ map.addLayer(map.gpsLayer);
+ }
}
var placement = $('html').attr('dir') === 'rtl' ? 'right' : 'left';
addOverlay(map.noteLayer, 'notes', OSM.MAX_NOTE_REQUEST_AREA);
addOverlay(map.dataLayer, 'data', OSM.MAX_REQUEST_AREA);
+ addOverlay(map.gpsLayer, 'gps', Number.POSITIVE_INFINITY);
}
options.sidebar.addPane($ui);
this.dataLayer = new L.OSM.DataLayer(null);
this.dataLayer.options.code = 'D';
+
+ this.gpsLayer = new L.OSM.GPS({
+ code: "G",
+ name: I18n.t("javascripts.map.base.gps")
+ });
},
updateLayers: function(layerParam) {
header: Map Layers
notes: Map Notes
data: Map Data
+ gps: Public GPS Traces
overlays: Enable overlays for troubleshooting the map
title: "Layers"
copyright: "© <a href='%{copyright_url}'>OpenStreetMap contributors</a>"
}
});
+L.OSM.GPS = L.OSM.TileLayer.extend({
+ options: {
+ url: document.location.protocol === 'https:' ?
+ 'https://{s}.gps-tile.openstreetmap.org/lines/{z}/{x}/{y}.png' :
+ 'http://{s}.gps-tile.openstreetmap.org/lines/{z}/{x}/{y}.png',
+ maxZoom: 20,
+ subdomains: 'abc'
+ }
+});
+
L.OSM.DataLayer = L.FeatureGroup.extend({
options: {
areaTags: ['area', 'building', 'leisure', 'tourism', 'ruins', 'historic', 'landuse', 'military', 'natural', 'sport'],