aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gmap_arcgis.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index da57403..1203e66 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -607,14 +607,21 @@ function gmapArcgis(config) {
}
self.unblockUI(name);
- return params.overlay;
+
+ if (name != undefined) {
+ this.config['layers'][name] = params.overlay;
+ }
+ else {
+ return params.overlay;
+ }
});
},
// Show a polygon resulting from the given query in multiple layers
showPolygonFromQueryMultiple: function (params, name, layers) {
- var self = this;
- var where = params.where;
+ var self = this;
+ var where = params.where;
+ var overlays = [];
// Format where clause for ajax request
where = where.replace(/=/g, '%3D');
@@ -635,12 +642,14 @@ function gmapArcgis(config) {
success: function (response) {
if (response.features != undefined && response.features.length != '0') {
args.uri += '/' + layer;
- self.showPolygonFromQuery(args, name);
+ overlays[n] = self.showPolygonFromQuery(args, name + '-' + n);
}
}
});
})(layer, args);
}
+
+ return overlays;
},
// Close all registered infoWindows