aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2013-12-11 18:45:36 -0200
committerSilvio <silvio@socioambiental.org>2013-12-11 18:45:36 -0200
commitb0223a630fdd55c8cc4cfd6557e4b3ad023b2b63 (patch)
treeaedf484b14b3e710d14654a7b89b77d2a1f5c690
parent258dad4b85673a63811553379cfc261b83a5b5e0 (diff)
downloadgmap_arcgis_js-blockui.tar.gz
gmap_arcgis_js-blockui.tar.bz2
Use 'map' if not undefined at setMap()blockui
-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';