Skip to content

Commit

Permalink
check outlineSource direct to account for features or featurecollecti…
Browse files Browse the repository at this point in the history
…on (#42)
  • Loading branch information
jessicamcinchak authored Aug 17, 2021
1 parent 2d2857d commit d48ba12
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 @@ -154,7 +154,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 d48ba12

Please sign in to comment.