-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Conversation
@@ -188,6 +188,7 @@ class Chart extends React.PureComponent { | |||
}); | |||
this.props.actions.chartRenderingSucceeded(this.props.chartKey); | |||
} catch (e) { | |||
console.error(e); // eslint-disable-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this console.error()
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
🚢 |
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.
dc51af7
to
b5e5b1b
Compare
* [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
* [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
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.