diff options
author | Silvio <silvio@socioambiental.org> | 2013-07-23 17:39:07 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2013-07-23 17:39:07 -0300 |
commit | 4e787be78c8bcbaaed25b277bd270ce9d75d88b0 (patch) | |
tree | ab79018b7342fef1d0ba4a49ad3c60b0de2d29c7 | |
parent | 3f98458bec76087a6acc3c0ee58a1544192e4100 (diff) | |
download | gmap_arcgis_js-4e787be78c8bcbaaed25b277bd270ce9d75d88b0.tar.gz gmap_arcgis_js-4e787be78c8bcbaaed25b277bd270ce9d75d88b0.tar.bz2 |
Do not use an empty LatLngBounds on showPolygonFromQuery()
-rw-r--r-- | gmap_arcgis.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 81df878..7d87820 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -546,8 +546,8 @@ function gmapArcgis(config) { }; layer.query(query, function(fset) { + var limit; var fs = fset.features; - var limit = new google.maps.LatLngBounds(); params.overlay = []; for (i in fs) { @@ -565,7 +565,12 @@ function gmapArcgis(config) { //self.setCenter(center, true); // Fit map to bounds, new version - limit.union(bounds); + if (limit.union == undefined) { + limit = bounds; + } + else { + limit.union(bounds); + } } // Show polygon |