diff options
-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 |