diff options
author | Silvio <silvio@socioambiental.org> | 2015-07-06 18:53:57 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2015-07-06 18:53:57 -0300 |
commit | df7647f831e2c3637eea60ab1232f08969712d82 (patch) | |
tree | 74d4ab72f268954af7c2df47ff5b7011e27c574d | |
parent | 0ccce2f27495396bcb838f003c47f238142f0311 (diff) | |
download | gmap_arcgis_js-df7647f831e2c3637eea60ab1232f08969712d82.tar.gz gmap_arcgis_js-df7647f831e2c3637eea60ab1232f08969712d82.tar.bz2 |
Support for map initialization, change mapName to mapId
-rw-r--r-- | gmap_arcgis.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 80494c4..9827278 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -33,6 +33,11 @@ function gmapArcgis(config) { } } + // Map initialization + if (config.mapId != null && config.mapOptions != null) { + config.map = new google.maps.Map(document.getElementById(config.mapId), config.mapOptions); + } + // Return a Gmap ArcGIS object return { // Storable properties @@ -497,7 +502,7 @@ function gmapArcgis(config) { return; } - if (jQuery.inArray(this.config.mapName, this.config[type][element]['showOn']) != -1) { + if (jQuery.inArray(this.config.mapId, this.config[type][element]['showOn']) != -1) { this[callback](element); } }, |