[geo] introduce "Auto Zoom" control (#4389)

* [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
This commit is contained in:
Maxime Beauchemin
2018-02-13 11:10:15 -08:00
committed by GitHub
parent db24cef03b
commit e0bbb0c77e
16 changed files with 141 additions and 34 deletions

View File

@@ -1266,10 +1266,10 @@ def load_deck_dash():
"point_radius_fixed": {"type": "metric", "value": "count"},
"point_unit": "square_m",
"row_limit": 5000,
"since": "2014-01-01",
"since": None,
"size": "count",
"time_grain_sqla": "Time Column",
"until": "now",
"until": None,
"viewport": {
"bearing": -4.952916738791771,
"latitude": 37.78926922909199,
@@ -1305,9 +1305,9 @@ def load_deck_dash():
"granularity_sqla": "date",
"size": "count",
"viz_type": "deck_screengrid",
"since": "2014-01-01",
"since": None,
"point_radius": "Auto",
"until": "now",
"until": None,
"color_picker": {
"a": 1,
"r": 14,
@@ -1352,10 +1352,10 @@ def load_deck_dash():
"granularity_sqla": "date",
"size": "count",
"viz_type": "deck_hex",
"since": "2014-01-01",
"since": None,
"point_radius_unit": "Pixels",
"point_radius": "Auto",
"until": "now",
"until": None,
"color_picker": {
"a": 1,
"r": 14,
@@ -1401,10 +1401,10 @@ def load_deck_dash():
"granularity_sqla": "date",
"size": "count",
"viz_type": "deck_grid",
"since": "2014-01-01",
"since": None,
"point_radius_unit": "Pixels",
"point_radius": "Auto",
"until": "now",
"until": None,
"color_picker": {
"a": 1,
"r": 14,
@@ -1446,8 +1446,8 @@ def load_deck_dash():
"slice_id": 41,
"granularity_sqla": None,
"time_grain_sqla": None,
"since": "7 days ago",
"until": "now",
"since": None,
"until": None,
"line_column": "contour",
"line_type": "json",
"mapbox_style": "mapbox://styles/mapbox/light-v9",
@@ -1515,8 +1515,8 @@ def load_deck_dash():
"slice_id": 42,
"granularity_sqla": "date",
"time_grain_sqla": "Time Column",
"since": "2014-01-01",
"until": "now",
"since": None,
"until": None,
"start_spatial": {
"type": "latlong",
"latCol": "LATITUDE",
@@ -1573,8 +1573,8 @@ def load_deck_dash():
"slice_id": 43,
"viz_type": "deck_path",
"time_grain_sqla": "Time Column",
"since": "7 days ago",
"until": "now",
"since": None,
"until": None,
"line_column": "path_json",
"line_type": "json",
"row_limit": 5000,