diff --git a/examples/internal/basemap-selector.html b/examples/internal/basemap-selector.html index 96f85304e3..9cc3022d62 100644 --- a/examples/internal/basemap-selector.html +++ b/examples/internal/basemap-selector.html @@ -1,333 +1,351 @@ - - Basemap selector | CARTO - - - - - - - - - - - -
-
-

Basemap selector

-

CartoDB

- -

Google Maps

- -
+ + Basemap selector | CARTO + + + + + + + + + + - // Remove the current baselayer - cartoDBMap.removeLayerAt(0); + +
- var changingProvider = currentProvider !== newProvider; - var createLayerMethod; +
+

Basemap selector

+

CartoDB

+ +

Google Maps

+ +
- if (newProvider === 'googlemaps') { - createLayerMethod = cartoDBMap.createGMapsBaseLayer; - } else { // leaflet - createLayerMethod = cartoDBMap.createTileLayer; - } + + - createLayerMethod.call(cartoDBMap, basemapAttrs, { - at: 0, - silent: changingProvider - }); + + - if (changingProvider) { - cartoDBMap.set('provider', newProvider); - currentProvider = newProvider; - } + + - window.onload = main; - - - + \ No newline at end of file diff --git a/examples/internal/gmaps-geometry-editor.html b/examples/internal/gmaps-geometry-editor.html index d4476e2815..0c80f352de 100644 --- a/examples/internal/gmaps-geometry-editor.html +++ b/examples/internal/gmaps-geometry-editor.html @@ -1,589 +1,596 @@ - - Geometry Editor | CARTO - - - - - - - - - - - - -