aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2013-04-09 19:06:38 -0300
committerSilvio <silvio@socioambiental.org>2013-04-09 19:06:38 -0300
commit4c24ddab618e817012b8edcdc78e8cccb1793939 (patch)
treedbb5c901c3d56e768c8c12e1eca1a71bf3fc1a68
parent20def2c190da3b30c01fdf2662cf5672ca85db5a (diff)
downloadgmap_arcgis_js-4c24ddab618e817012b8edcdc78e8cccb1793939.tar.gz
gmap_arcgis_js-4c24ddab618e817012b8edcdc78e8cccb1793939.tar.bz2
Make bounds optional at addMarkers
-rw-r--r--gmap_arcgis.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index bc8674c..5689e6b 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -232,8 +232,7 @@ function gmapArcgis(config) {
// Add makers to the map
addMarkers: function(element) {
- var bounds = this.map.getBounds();
- var self = this;
+ var self = this;
if (this.config['markers'][element].overlay != undefined) {
this.toggleMarkers(element);
@@ -249,8 +248,8 @@ function gmapArcgis(config) {
// Query parameters
var query = {
returnGeometry: true,
- geometry: bounds,
- where: (this.config['markers'][element].where != undefined) ? this.config['markers'][element].where : '1=1',
+ geometry: (this.config['markers'][element].bounds != undefined) ? this.config['markers'][element].bounds : undefined,
+ where: (this.config['markers'][element].where != undefined) ? this.config['markers'][element].where : '1=1',
outFields: this.config['markers'][element].fields,
};