From b0223a630fdd55c8cc4cfd6557e4b3ad023b2b63 Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 11 Dec 2013 18:45:36 -0200 Subject: Use 'map' if not undefined at setMap() --- gmap_arcgis.js | 8 +++++--- 1 file 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'; -- cgit v1.2.3