aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2014-11-18 16:36:57 -0200
committerSilvio <silvio@socioambiental.org>2014-11-18 16:36:57 -0200
commitccb12f8fa0b4d70a5a98c4adbb9eee55905c0f06 (patch)
treec9f62cc70c67ad8144912d81b24dd182072886e6
parentbf2763538b807e54e1ed45ba79cee5a95cbccba9 (diff)
downloadgmap_arcgis_js-ccb12f8fa0b4d70a5a98c4adbb9eee55905c0f06.tar.gz
gmap_arcgis_js-ccb12f8fa0b4d70a5a98c4adbb9eee55905c0f06.tar.bz2
Add layer to config on showPolygonFromQuery / showPolygonFromQueryMultiple
-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