aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gmap_arcgis.js15
1 files changed, 15 insertions, 0 deletions
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) {