aboutsummaryrefslogtreecommitdiff
path: root/gmap_arcgis.js
diff options
context:
space:
mode:
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r--gmap_arcgis.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index dc26742..55c6b71 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -436,7 +436,7 @@ function gmapArcgis(config) {
// Toggle layer visibility
toggleLayers: function(element) {
- if (this.config['layers'][element].overlay != undefined && this.config['layers'][element].overlay.setVisible != undefined) {
+ if (this.config['layers'][element] != undefined && this.config['layers'][element].overlay != undefined && this.config['layers'][element].overlay.setVisible != undefined) {
var changeTo = !this.config['layers'][element].overlay.getVisible();
this.config['layers'][element].overlay.setVisible(changeTo);
}