Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maps] auto-fit to data bounds #66452

Closed
wants to merge 7 commits into from
Closed

Conversation

nreese
Copy link
Contributor

@nreese nreese commented May 13, 2020

Fixes #2054, #32738, #53831

This PR adds a new map setting that will auto fit the map to data bounds.

Screen Shot 2020-05-13 at 12 31 09 PM

PR adds data request for bounds for the following reasons

  1. User feedback when layer is loading bounds.
  2. Provide a way to cancel previous bounds requests when new bounds requests are started before previous bounds requests finish
  3. Skip syncData when layer is fetching bounds. This will prevent a double fetch when "auto fit to data bounds" is turned on.

cc @alexfrancoeur

@nreese nreese added release_note:enhancement [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.9.0 labels May 13, 2020
@nreese nreese requested review from jsanz and thomasneirynck May 13, 2020 18:32
@nreese nreese requested a review from a team as a code owner May 13, 2020 18:32
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@@ -489,7 +518,7 @@ export class VectorLayer extends AbstractLayer {
layerName,
style,
dynamicStyleProps,
registerCancelCallback,
registerCancelCallback.bind(null, requestToken),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a bug while working on this PR where style meta did not properly register callback.

@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@jsanz
Copy link
Member

jsanz commented May 14, 2020

I've been doing quite a lot of testing and I think the only thing I've found is that the filtering is not working for EMS boundaries, but not sure if it's because there's apparently an unrelated bug that prevents run the Fit to data tooltip or global button for that layer type.

Peek 2020-05-14 16-58

Checked on clusters, heatmaps, grids, and point to point.

@nreese
Copy link
Contributor Author

nreese commented May 14, 2020

I've been doing quite a lot of testing and I think the only thing I've found is that the filtering is not working for EMS boundaries, but not sure if it's because there's apparently an unrelated bug that prevents run the Fit to data tooltip or global button for that layer type.

That is an existing behavior on master and not related to this PR. Mind creating an issue for it and I can fix outside of this PR?

@jsanz
Copy link
Member

jsanz commented May 14, 2020

Another issue is that somehow this setting is conflicting with Kibana Bar filters for the Point to Point layer. Without the setting enabled I can create filters from the bar without problems but once enabled, the map freezes when searching in the bar.

I can see a 400 error on a request to the cluster

image

@nreese
Copy link
Contributor Author

nreese commented May 28, 2020

temporarily closing. I am going to pull the getBounds data request into its own PR to separate the bulk of the changes from the auto-complete. Will re-open once the prior has been merged and this PR is updated to latest

@nreese
Copy link
Contributor Author

nreese commented Jul 16, 2020

Auto fit to bounds changes pulled out into #72129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coordinate Maps: auto fit data bounds
4 participants