kopia lustrzana https://github.com/robhawkes/vizicities
Updated basic example to show off promises
rodzic
de3960ba52
commit
91e873bd12
|
@ -12,7 +12,9 @@ VIZI.Controls.orbit().addTo(world);
|
|||
// CartoDB basemap
|
||||
VIZI.imageTileLayer('http://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
||||
}).addTo(world);
|
||||
}).addTo(world).then(() => {
|
||||
console.log('Added image tile layer to world');
|
||||
});;
|
||||
|
||||
// Buildings from Mapzen
|
||||
VIZI.topoJSONTileLayer('https://vector.mapzen.com/osm/buildings/{z}/{x}/{y}.topojson?api_key=vector-tiles-NT5Emiw', {
|
||||
|
@ -36,5 +38,5 @@ VIZI.topoJSONTileLayer('https://vector.mapzen.com/osm/buildings/{z}/{x}/{y}.topo
|
|||
},
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, <a href="http://whosonfirst.mapzen.com#License">Who\'s On First</a>.'
|
||||
}).addTo(world).then(() => {
|
||||
console.log('Added to world');
|
||||
console.log('Added TopoJSON layer to world');
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue