diff --git a/examples/compiled/interactive_geo_earthquakes.vg.json b/examples/compiled/interactive_geo_earthquakes.vg.json index 24d9a2785a..5e5d0ca1a5 100644 --- a/examples/compiled/interactive_geo_earthquakes.vg.json +++ b/examples/compiled/interactive_geo_earthquakes.vg.json @@ -28,7 +28,7 @@ }, { "type": "filter", - "expr": "(rotate0 * -1) - 90 < datum.longitude && datum.longitude < (rotate0 * -1) + 90 && (rotate1 * -1) - 90 < datum.latitude && datum.latitude < (rotate1 * -1) + 90" + "expr": "(rotate * -1) - 90 < datum.longitude && datum.longitude < (rotate * -1) + 90" }, {"type": "formula", "expr": "datum.properties.mag", "as": "magnitude"}, { @@ -55,17 +55,12 @@ "size": {"signal": "[width, height]"}, "fit": {"signal": "[data('source_0'), data('world'), layer_2_geojson_0]"}, "type": "orthographic", - "rotate": {"signal": "[rotate0, rotate1, 0]"} + "rotate": {"signal": "[rotate, 0, 0]"} } ], "signals": [ { - "name": "rotate0", - "value": 0, - "bind": {"input": "range", "min": -90, "max": 90, "step": 1} - }, - { - "name": "rotate1", + "name": "rotate", "value": 0, "bind": {"input": "range", "min": -90, "max": 90, "step": 1} }, @@ -113,7 +108,7 @@ "opacity": {"value": 0.25}, "fill": {"value": "red"}, "tooltip": { - "signal": "{\"magnitude\": isValid(datum[\"magnitude\"]) ? datum[\"magnitude\"] : \"\"+datum[\"magnitude\"]}" + "signal": "{\"magnitude\": isValid(datum[\"magnitude\"]) ? datum[\"magnitude\"] : \"\"+datum[\"magnitude\"], \"longitude\": isValid(datum[\"longitude\"]) ? datum[\"longitude\"] : \"\"+datum[\"longitude\"], \"latitude\": isValid(datum[\"latitude\"]) ? datum[\"latitude\"] : \"\"+datum[\"latitude\"]}" }, "ariaRoleDescription": {"value": "circle"}, "description": { diff --git a/examples/specs/interactive_geo_earthquakes.vl.json b/examples/specs/interactive_geo_earthquakes.vl.json index 353f0d333b..b39cfda15f 100644 --- a/examples/specs/interactive_geo_earthquakes.vl.json +++ b/examples/specs/interactive_geo_earthquakes.vl.json @@ -4,16 +4,11 @@ "height": 300, "projection": { "type": "orthographic", - "rotate": {"expr": "[rotate0, rotate1, 0]"} + "rotate": {"expr": "[rotate, 0, 0]"} }, "params": [ { - "name": "rotate0", - "value": 0, - "bind": {"input": "range", "min": -90, "max": 90, "step": 1} - }, - { - "name": "rotate1", + "name": "rotate", "value": 0, "bind": {"input": "range", "min": -90, "max": 90, "step": 1} }, @@ -46,7 +41,7 @@ {"calculate": "datum.geometry.coordinates[0]", "as": "longitude"}, {"calculate": "datum.geometry.coordinates[1]", "as": "latitude"}, { - "filter": "(rotate0 * -1) - 90 < datum.longitude && datum.longitude < (rotate0 * -1) + 90 && (rotate1 * -1) - 90 < datum.latitude && datum.latitude < (rotate1 * -1) + 90" + "filter": "(rotate * -1) - 90 < datum.longitude && datum.longitude < (rotate * -1) + 90" }, {"calculate": "datum.properties.mag", "as": "magnitude"} ], @@ -64,8 +59,8 @@ "range": [0, {"expr": "pow(earthquakeSize, 3)"}] } }, - "tooltip": [{"field": "magnitude"}] + "tooltip": [{"field": "magnitude"}, {"field": "longitude"}, {"field": "latitude"}] } } ] -} \ No newline at end of file +} diff --git a/examples/specs/normalized/interactive_geo_earthquakes_normalized.vl.json b/examples/specs/normalized/interactive_geo_earthquakes_normalized.vl.json index c89a4f247b..38430f107b 100644 --- a/examples/specs/normalized/interactive_geo_earthquakes_normalized.vl.json +++ b/examples/specs/normalized/interactive_geo_earthquakes_normalized.vl.json @@ -4,12 +4,7 @@ "height": 300, "params": [ { - "name": "rotate0", - "value": 0, - "bind": {"input": "range", "min": -90, "max": 90, "step": 1} - }, - { - "name": "rotate1", + "name": "rotate", "value": 0, "bind": {"input": "range", "min": -90, "max": 90, "step": 1} }, @@ -25,7 +20,7 @@ "mark": {"type": "geoshape", "fill": "aliceblue"}, "projection": { "type": "orthographic", - "rotate": {"expr": "[rotate0, rotate1, 0]"} + "rotate": {"expr": "[rotate, 0, 0]"} } }, { @@ -37,7 +32,7 @@ "mark": {"type": "geoshape", "fill": "mintcream", "stroke": "black"}, "projection": { "type": "orthographic", - "rotate": {"expr": "[rotate0, rotate1, 0]"} + "rotate": {"expr": "[rotate, 0, 0]"} } }, { @@ -60,19 +55,23 @@ "range": [0, {"expr": "pow(earthquakeSize, 3)"}] } }, - "tooltip": [{"field": "magnitude"}] + "tooltip": [ + {"field": "magnitude"}, + {"field": "longitude"}, + {"field": "latitude"} + ] }, "transform": [ {"calculate": "datum.geometry.coordinates[0]", "as": "longitude"}, {"calculate": "datum.geometry.coordinates[1]", "as": "latitude"}, { - "filter": "(rotate0 * -1) - 90 < datum.longitude && datum.longitude < (rotate0 * -1) + 90 && (rotate1 * -1) - 90 < datum.latitude && datum.latitude < (rotate1 * -1) + 90" + "filter": "(rotate * -1) - 90 < datum.longitude && datum.longitude < (rotate * -1) + 90" }, {"calculate": "datum.properties.mag", "as": "magnitude"} ], "projection": { "type": "orthographic", - "rotate": {"expr": "[rotate0, rotate1, 0]"} + "rotate": {"expr": "[rotate, 0, 0]"} } } ]