From df7647f831e2c3637eea60ab1232f08969712d82 Mon Sep 17 00:00:00 2001 From: Silvio Date: Mon, 6 Jul 2015 18:53:57 -0300 Subject: Support for map initialization, change mapName to mapId --- gmap_arcgis.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } }, -- cgit v1.2.3