Skip to content

Commit

Permalink
[maps] fix fit to bounds for ES document layers with joins (elastic#7…
Browse files Browse the repository at this point in the history
…3985)

# Conflicts:
#	x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.js
#	x-pack/test/functional/apps/maps/auto_fit_to_bounds.js
  • Loading branch information
nreese committed Aug 1, 2020
1 parent ec583ce commit 2c28563
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ export class VectorLayer extends AbstractLayer {

async getBounds({ startLoading, stopLoading, registerCancelCallback, dataFilters }) {
const isStaticLayer = !this.getSource().isBoundsAware();
if (isStaticLayer) {
return getFeatureCollectionBounds(this._getSourceFeatureCollection(), this._hasJoins());
if (isStaticLayer || this.hasJoins()) {
return getFeatureCollectionBounds(this._getSourceFeatureCollection(), this.hasJoins());
}

const requestToken = Symbol(`${SOURCE_BOUNDS_DATA_REQUEST_ID}-${this.getId()}`);
Expand Down

0 comments on commit 2c28563

Please sign in to comment.