Don't show map controls on browse pages
This commit is contained in:
parent
411748a48c
commit
19bac47e5f
2 changed files with 15 additions and 5 deletions
|
@ -21,7 +21,11 @@ $(document).ready(function () {
|
|||
return false;
|
||||
}
|
||||
|
||||
var map = createMap("small_map");
|
||||
var map = createMap("small_map", {
|
||||
layerControl: false,
|
||||
zoomControl: false,
|
||||
attributionControl: false
|
||||
});
|
||||
|
||||
var params = $("#small_map").data();
|
||||
if (params.type == "changeset") {
|
||||
|
|
|
@ -76,12 +76,18 @@ var layers = [
|
|||
}
|
||||
];
|
||||
|
||||
function createMap(divName) {
|
||||
map = L.map(divName);
|
||||
function createMap(divName, options) {
|
||||
map = L.map(divName, options);
|
||||
|
||||
map.attributionControl.setPrefix(''); // For tmcw
|
||||
if (map.attributionControl) {
|
||||
map.attributionControl.setPrefix(''); // For tmcw
|
||||
}
|
||||
|
||||
var layersControl = L.control.layers().addTo(map);
|
||||
var layersControl = L.control.layers();
|
||||
|
||||
if (!options || options.layerControl !== false) {
|
||||
layersControl.addTo(map);
|
||||
}
|
||||
|
||||
for (var i = 0; i < layers.length; i++) {
|
||||
layers[i].layer = L.tileLayer(layers[i].urlTemplate, layers[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue