aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gmap_arcgis.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index f8f09f1..abdbb64 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -121,11 +121,13 @@ function gmapArcgis(config) {
// Set the current map
setMap: function(map) {
- this.map = map;
- this.setCenter(map.getCenter());
+ if (map != undefined) {
+ this.map = map;
+ this.setCenter(map.getCenter());
+ }
},
- // Get the default opacity of an layer element
+ // Get the default opacity of a layer element
defaultOpacity: function(element, store) {
store = (store != undefined) ? store : 'layers';