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;
-
-
-
+