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

[geo] introduce "Auto Zoom" control #4389

Merged
merged 2 commits into from
Feb 13, 2018

Conversation

mistercrunch
Copy link
Member

On geospatial visualization, checking the "Auto Zoom" control makes it
such that the viewport is fitted to the data upon rendering the chart.

For dashboards with region filters, the map should jump to the right
position.

Eventually we should enhance this to fly and ease to the position in an
animated way.

@@ -188,6 +188,7 @@ class Chart extends React.PureComponent {
});
this.props.actions.chartRenderingSucceeded(this.props.chartKey);
} catch (e) {
console.error(e); // eslint-disable-line
Copy link
Member

Choose a reason for hiding this comment

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

remove this console.error()

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking about keeping that one around (that's why I silenced the linter). This gives us a stack trace instead of swallowing errors happening in the visualizations.

import { GeoJsonLayer } from 'deck.gl';
// import geojsonExtent from 'geojson-extent';
Copy link
Member

@hughhhh hughhhh Feb 10, 2018

Choose a reason for hiding this comment

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

nit: Put this with a TODO: clause, I rather remove this and have it on separate feature branch

@@ -100,6 +99,11 @@ function deckGeoJson(slice, payload, setControlValue) {
width: slice.width(),
height: slice.height(),
};
if (slice.formData.autozoom) {
// TODO get this to work
Copy link
Member

Choose a reason for hiding this comment

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

Tied to comment above.

@@ -8,6 +8,15 @@ import DeckGLContainer from './../DeckGLContainer';
import * as common from './common';
import sandboxedEval from '../../../javascripts/modules/sandbox';

function getPoints(data) {
Copy link
Member

@hughhhh hughhhh Feb 10, 2018

Choose a reason for hiding this comment

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

Definitely think we should work this getPoints() into a deckGL utils file. I see it being used in each layer. I definitely think we should try and consolidate this method to work for all layers.

Copy link
Member Author

Choose a reason for hiding this comment

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

The idea is that it can be different for each layer. In places where it's common across layers it's a simple accessor (d => d.position) which I'd rather keep as is than having a redirection to a positionAccessor helper in another file.

Copy link
Member

Choose a reason for hiding this comment

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

Thinking about it now you are right it would be more work to actual implement the positionAccessor helper.

@hughhhh
Copy link
Member

hughhhh commented Feb 11, 2018

🚢

On geospatial visualization, checking the "Auto Zoom" control makes it
such that the viewport is fitted to the data upon rendering the chart.

For dashboards with region filters, the map should jump to the right
position.

Eventually we should enhance this to fly and ease to the position in an
animated way.
@mistercrunch mistercrunch merged commit e0bbb0c into apache:master Feb 13, 2018
@mistercrunch mistercrunch deleted the viewport_autozoom branch February 13, 2018 19:10
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* [geo] introduce "Auto Zoom" control

On geospatial visualization, checking the "Auto Zoom" control makes it
such that the viewport is fitted to the data upon rendering the chart.

For dashboards with region filters, the map should jump to the right
position.

Eventually we should enhance this to fly and ease to the position in an
animated way.

* Added TODO notes
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* [geo] introduce "Auto Zoom" control

On geospatial visualization, checking the "Auto Zoom" control makes it
such that the viewport is fitted to the data upon rendering the chart.

For dashboards with region filters, the map should jump to the right
position.

Eventually we should enhance this to fly and ease to the position in an
animated way.

* Added TODO notes
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants