diff options
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r-- | gmap_arcgis.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 49bb063..c9bf01d 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -656,9 +656,17 @@ function gmapArcgis(config) { // Show a polygon resulting from the given query in multiple layers showPolygonFromQueryMultiple: function (params, name, layers) { - var self = this; - var where = params.where; - var overlays = []; + var self = this; + var where = params.where; + + // Hold overlays + if (self.config['layers'][name] == undefined) { + self.config['layers'][name] = {}; + } + + if (self.config['layers'][name].overlay == undefined) { + self.config['layers'][name].overlay = []; + } // Format where clause for ajax request where = where.replace(/=/g, '%3D'); @@ -679,14 +687,12 @@ function gmapArcgis(config) { success: function (response) { if (response.features != undefined && response.features.length != '0') { args.uri += '/' + layer; - overlays[n] = self.showPolygonFromQuery(args, name + '-' + n); + self.config['layers'][name].overlay[n] = self.showPolygonFromQuery(args, name + '-' + n); } } }); })(layer, args); } - - return overlays; }, // Close all registered infoWindows |