summaryrefslogtreecommitdiff
path: root/httemplate/search/elements/gmap.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/elements/gmap.html')
-rw-r--r--httemplate/search/elements/gmap.html15
1 files changed, 10 insertions, 5 deletions
diff --git a/httemplate/search/elements/gmap.html b/httemplate/search/elements/gmap.html
index b7d135dd6..47db1507d 100644
--- a/httemplate/search/elements/gmap.html
+++ b/httemplate/search/elements/gmap.html
@@ -99,11 +99,16 @@ function initMap() {
// construct bounds around all of the features
var bounds = new google.maps.LatLngBounds;
map.data.forEach(function(feature) {
- var g = feature.getGeometry();
- if (g.getType() == 'Point') {
- bounds.extend(g.get());
- } else if (g.getArray) {
- g.getArray().forEach(function(point) { bounds.extend(point); });
+ var b = feature.getProperty('bounds');
+ if (b) { // if it specifies an ROI, include all of it
+ bounds.union(b);
+ } else {
+ var g = feature.getGeometry();
+ if (g.getType() == 'Point') {
+ bounds.extend(g.get());
+ } else if (g.getArray) {
+ g.getArray().forEach(function(point) { bounds.extend(point); });
+ }
}
});