Skip to main content

View State

A camera: longitude, latitude, zoom, pitch and bearing, which numbers can drive. A camera, point or bounds wired into From sets the fields it has, and the rest are this node's.

Syntax​

{ "id": "n1", "op": "view-state", "name": "view-state", "x": 0, "y": 0, "params": {} }

One out of it starts at "sourcePort": "viewState"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:longitude, or read elsewhere as ch('view-state/longitude').

Inputs​

This operator has no input ports.

Parameters​

ParameterKindDefaultChoices
fromfield
longitudefloat-74.006
latitudefloat40.7128
zoomfloat12
pitchfloat0
bearingfloat0

Outputs​

PortType
viewStatevalue

Details​

  • Category: Output
  • Operator: view-state

Older projects​

Projects saved before documents used operator classes. These convert to view-state when they open: MapViewStateOp.