Merge pull request #12 from yayachiken/master
Fixed client-dots and labels not showing on zoom levels >= 19
This commit is contained in:
commit
5fce722f24
10
lib/map.js
10
lib/map.js
@ -290,6 +290,12 @@ define(["map/clientlayer", "map/labelslayer",
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
var maxLayerZoom = Math.max.apply(Math, config.mapLayers.map(
|
||||||
|
function(d) {
|
||||||
|
return (typeof d.config !== "undefined" && typeof d.config.maxZoom !== "undefined") ? d.config.maxZoom : 18
|
||||||
|
}))
|
||||||
|
|
||||||
|
|
||||||
layers[0].layer.addTo(map)
|
layers[0].layer.addTo(map)
|
||||||
|
|
||||||
layers.forEach( function (d) {
|
layers.forEach( function (d) {
|
||||||
@ -320,11 +326,11 @@ define(["map/clientlayer", "map/labelslayer",
|
|||||||
d.forEach(addLayer)
|
d.forEach(addLayer)
|
||||||
}
|
}
|
||||||
|
|
||||||
var clientLayer = new ClientLayer({minZoom: 15})
|
var clientLayer = new ClientLayer({minZoom: 15, maxZoom: maxLayerZoom})
|
||||||
clientLayer.addTo(map)
|
clientLayer.addTo(map)
|
||||||
clientLayer.setZIndex(5)
|
clientLayer.setZIndex(5)
|
||||||
|
|
||||||
var labelsLayer = new LabelsLayer()
|
var labelsLayer = new LabelsLayer({maxZoom: maxLayerZoom})
|
||||||
labelsLayer.addTo(map)
|
labelsLayer.addTo(map)
|
||||||
labelsLayer.setZIndex(6)
|
labelsLayer.setZIndex(6)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user