var map = L.mapbox.map(' map',' wmarci.i6n42nl5',
{ center:new L.LatLng(38.8929,-100.0252), zoom:4, minZoom:0, maxZoom:18, 层数:[ L.tileLayer(' wmarci.k300ifal',{ maxZoom:13, minZoom:5, }) ] });
这似乎不起作用......想法?我打电话给瓦工错了吗?
答案 0 :(得分:0)
这样的东西,使用tileLayer(之前定义)并根据缩放级别将其关闭和打开...
map.on('zoomend load ready', function() {
if (map.getZoom() < 16) {
map.removeLayer(zoomedinmap);
} else {
map.addLayer(zoomedinmap);
}
});