From a61af1a2ac4ca325c33a4b776bef2f54fcd313e5 Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 23 Apr 2013 16:29:55 -0300 Subject: Adds cleanOverlays() method --- gmap_arcgis.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gmap_arcgis.js b/gmap_arcgis.js index b1b2cff..ec3b44e 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -512,6 +512,21 @@ function gmapArcgis(config) { } }, + // Remove all loaded overlays + cleanOverlays: function() { + for (overlay in [ 'layers', 'markers' ]) { + for (element in this.config[overlay]) { + if (this.config[overlay][element].infowindow != undefined) { + delete this.config[overlay][element].infowindow; + } + + if (this.config[overlay][element].overlay != undefined) { + delete this.config[overlay][element].overlay; + } + } + } + }, + // Add panoramio layer addPanoramio: function() { if (this.config.panoramio.panoramioLayer == undefined) { -- cgit v1.2.3