GeoExpression.png

What it is. GeoExpression links the map's zoom to a value somewhere else in your scene. As the camera flies in or out, something changes with it — a border line thins as you approach, a label fades in only once you are close enough, a readout counts down. You draw a curve that says "at this zoom, that value", point it at what you want driven, and it runs continuously from then on.

The pattern is always the same three decisions: the curve (what value at what zoom), the range it is allowed to produce, and the target it lands on. It sits on the container carrying whatever it drives.

The reason it exists is that hand-animating these relationships doesn't survive a live camera. An operator flying the map freely will stop anywhere, and a keyframed animation only looks right if they stop where you expected. A curve against zoom is correct at every point in between.

See chapter Working with Maps for detailed information

Parameters

Parameter

What it is for

Target

What kind of thing the output drives. Alpha fades the container — the simplest way to have detail appear only at close zooms. Line Node Thickness drives the width of a GeoJSON line, which is the classic case: borders that stay readable whether you are looking at a continent or a county. Plugin Parameter drives any parameter of another plugin on the same container. Script Parameter hands the value to a Viz script, for anything the other three can't express.

Plugin Name

Which plugin on the container to drive. Only relevant for the Plugin Parameter target — the other three know their own destination.

Plugin Parameter Name

Which parameter of that plugin receives the value. For a Script Parameter target this is the name the script registered, and it's the only field needed since the script is found on the container itself.

Payload

The curve — the heart of it. A set of points, each pairing a zoom level with the value you want at that zoom. Two points give a simple ramp; more let you hold a value across a range and then change quickly, which is usually what looks right on air.

Interpolation

How values between your curve points are found. Linear blends smoothly and is what you want for anything continuous — thickness, alpha, size. Step holds each value until the next point is reached, for things that should switch rather than slide, like a label that is either on or off.

Min Value / Max Value

The bounds the output is allowed to take. These are your guard rails: they stop an extreme zoom from producing a hairline too thin to see or a line thick enough to swamp the map. Set them to the range you are happy to broadcast, not the widest the target accepts.

Current Zoom Level

The zoom the expression is working from. Mainly useful while designing — set it by hand to preview what the curve does at a given zoom without flying the camera there and back.

Current Output Value

The value the curve is producing right now. The field to watch when something isn't behaving: if this moves as expected but the target doesn't change, the problem is the target wiring, not the curve.

Status

Feedback from the plugin about its current state. Worth a glance if the expression isn't doing anything.

Building one

Set the target first, then the range, then draw the curve — in that order, because the range decides what the curve's values mean. Preview by typing zoom levels into Current Zoom Level rather than flying the camera; it is far quicker, and it lets you check the extremes deliberately instead of hoping you happen to pass through them.

The output is only ever a single number, so driving several parameters means several GeoExpressions; and Current Output Value is the first place to look when debugging, since it cleanly separates "the curve is wrong" from "the curve is fine but isn't reaching its target".