in src/app/map/map.component.ts [179:199]
updateFeatures() {
if (!this.map) return;
this._features = GeoJSONService.rowsToGeoJSON(this._rows, this._geoColumn);
// Note which types of geometry are being shown.
this._activeGeometryTypes.clear();
this._features.forEach((feature) => {
this._activeGeometryTypes.add(feature.geometry['type']);
});
this.reportGeometryAnalytics();
// Fit viewport bounds to the data.
const [minX, minY, maxX, maxY] = bbox({ type: 'FeatureCollection', features: this._features });
const bounds = new google.maps.LatLngBounds(
new google.maps.LatLng(minY, minX),
new google.maps.LatLng(maxY, maxX)
);
if (!bounds.isEmpty()) { this.map.fitBounds(bounds); }
}