mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
parent
b5a389ac1f
commit
4c159693ee
1 changed files with 13 additions and 5 deletions
|
@ -196,7 +196,12 @@ export class VectorLayer extends AbstractLayer {
|
|||
if (!featureCollection) {
|
||||
return null;
|
||||
}
|
||||
const bbox = turf.bbox(featureCollection);
|
||||
|
||||
const visibleFeatures = featureCollection.features.filter(feature => feature.properties[FEATURE_VISIBLE_PROPERTY_NAME]);
|
||||
const bbox = turf.bbox({
|
||||
type: 'FeatureCollection',
|
||||
features: visibleFeatures
|
||||
});
|
||||
return {
|
||||
min_lon: bbox[0],
|
||||
min_lat: bbox[1],
|
||||
|
@ -206,11 +211,14 @@ export class VectorLayer extends AbstractLayer {
|
|||
}
|
||||
|
||||
async getBounds(dataFilters) {
|
||||
if (this._source.isBoundsAware()) {
|
||||
const searchFilters = this._getSearchFilters(dataFilters);
|
||||
return await this._source.getBoundsForFilters(searchFilters);
|
||||
|
||||
const isStaticLayer = !this._source.isBoundsAware() || !this._source.isFilterByMapBounds();
|
||||
if (isStaticLayer) {
|
||||
return this._getBoundsBasedOnData();
|
||||
}
|
||||
return this._getBoundsBasedOnData();
|
||||
|
||||
const searchFilters = this._getSearchFilters(dataFilters);
|
||||
return await this._source.getBoundsForFilters(searchFilters);
|
||||
}
|
||||
|
||||
async getLeftJoinFields() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue