Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
zoomToFeatureExtent() {
if (this.feature.geometry) {
const olFeature = this.format.readFeature(this.feature, {
dataProjection: this.feature.projection,
featureProjection: this.map.projection
});
moveToOlFeatures(this.map, [olFeature], FeatureMotion.Zoom);
}
}
handler: () => {
const olFeature = this.format.readFeature(this.resultSelected$.getValue().data, {
dataProjection: this.resultSelected$.getValue().data.projection,
featureProjection: this.map.projection
});
moveToOlFeatures(this.map, [olFeature], FeatureMotion.Zoom);
}
},
handler: () => {
const olFeatures = [];
for (const result of this.store.all()) {
const olFeature = this.format.readFeature(result.data, {
dataProjection: result.data.projection,
featureProjection: this.map.projection
});
olFeatures.push(olFeature);
}
moveToOlFeatures(this.map, olFeatures, FeatureMotion.Zoom);
}
},
zoomToFeatureExtent() {
if (this.feature.geometry) {
const olFeature = this.format.readFeature(this.feature, {
dataProjection: this.feature.projection,
featureProjection: this.map.projection
});
moveToOlFeatures(this.map, [olFeature], FeatureMotion.Zoom);
}
}