Updated basic example to show off promises

feature/web-workers-polygons-memory
Robin Hawkes 2016-08-30 16:59:16 +01:00
rodzic de3960ba52
commit 91e873bd12
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 1EC4C2D6765FA8CF
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -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: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <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: '&copy; <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');
});