lib/cartodb-gmapsv3.js
// Remove old cartodb layer added (wax or imagemaptype)
Remove old cartodb layer added (wax or imagemaptype)
Remove old cartodb layer added ( wax or imagemaptype )
function removeOldLayer(map,layer) {
        if (layer) {
          var pos = -1;
          map.overlayMapTypes.forEach(function(map_type,i){
            if (layer == map_type && map_type.name == layer.name && map_type.description == layer.description) {
              pos = i;
            }
          });
          if (pos!=-1) 
            map.overlayMapTypes.removeAt(pos);
          layer = null;
        }
      }
function removeOldLayer ( map , layer ) { if ( layer ) { var pos = - 1 ; map . overlayMapTypes . forEach ( function ( map_type , i ) { if ( layer == map_type && map_type . name == layer . name && map_type . description == layer . description ) { pos = i ; } } ) ; if ( pos != - 1 ) map . overlayMapTypes . removeAt ( pos ) ; layer = null ; } }
Remove old cartodb layer added (wax or imagemaptype)
Remove old cartodb layer added ( wax or imagemaptype )