From 91e873bd1222bd77fae0896bca1ed4fb1fe63f3d Mon Sep 17 00:00:00 2001 From: Robin Hawkes Date: Tue, 30 Aug 2016 16:59:16 +0100 Subject: [PATCH] Updated basic example to show off promises --- examples/basic/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/basic/main.js b/examples/basic/main.js index 7336fbb..dcb8c3a 100644 --- a/examples/basic/main.js +++ b/examples/basic/main.js @@ -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: '© OpenStreetMap contributors, © CartoDB' -}).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: '© OpenStreetMap contributors, Who\'s On First.' }).addTo(world).then(() => { - console.log('Added to world'); + console.log('Added TopoJSON layer to world'); });