From 4e787be78c8bcbaaed25b277bd270ce9d75d88b0 Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 23 Jul 2013 17:39:07 -0300 Subject: Do not use an empty LatLngBounds on showPolygonFromQuery() --- gmap_arcgis.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gmap_arcgis.js') 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 -- cgit v1.2.3