0
我有一個小冊子底圖成立:如何添加Mapbox JSON層在單張
var cloudmadeUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18});
var map1 = new L.Map('map', {layers: [cloudmade], center: new L.LatLng(51.505, -0.04), zoom: 6});
現在我想使用HTML切換幾個Mapbox JSON層:
map1 .layers({
1: { api: 'http://a.tiles.mapbox.com/v3/inosys.1cpsycqc.jsonp',
center: { ease: 1000 }
},
2: {
api: 'http://a.tiles.mapbox.com/v3/mapster88.1.jsonp',
center: { ease: 1000 }
},
3: {
api: 'http://a.tiles.mapbox.com/v3/mapster88.2.jsonp',
center: { ease: 1000 }
},
這裏是測試圖:http://erichsen-group.com/demoland/taylorpeterh/index19.html
如何配置map1 .layers使用傳單L.Map?