Skip to content

Commit

Permalink
check outlineSource direct to account for features or featurecollection
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Aug 17, 2021
1 parent 2263de3 commit a896ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/my-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class MyMap extends LitElement {
if (this.showFeaturesAtPoint) {
const extent = featureSource.getExtent();
map.getView().fit(buffer(extent, this.featureBuffer));
} else if (this.geojsonData.features.length > 0) {
} else if (outlineSource.getFeatures().length > 0) {
const extent = outlineSource.getExtent();
map.getView().fit(buffer(extent, this.geojsonBuffer));
} else {
Expand Down

0 comments on commit a896ddb

Please sign in to comment.