geo.viewport.camera
9 functions / 20 types
Index
| Function | Description |
|---|---|
| FlyTo | Animate one viewport to a position on a map, acquiring geographic camera control. Zero duration places the camera on the next frame. An omitted duration uses three seconds. A flight to another map crosses on the globe and lands in the view the camera set out in. A flight asked for during a switch between the views starts at once, and the switch carries the camera to it. |
| GetClearance | Read how near one viewport camera comes to drawn geometry, in meters, as geo.viewport.camera.set_clearance describes it. |
| GetFlight | Read how far the last flight geo.viewport.camera.fly_to sent a viewport on has come. |
| GetLocation | Read where one viewport camera stands over the map, and the ground under the middle of its view. |
| GetZoomOutLimit | Read how far one viewport camera zooms out from the globe, as geo.viewport.camera.set_zoom_out_limit describes it. |
| OrbitTo | Fails unless longitude and latitude name a place. Turn viewport cameras about the ground in the middle of their view, which stays in the middle all the way, to look at it from a new heading, pitch or range. |
| SetClearance | Set how near viewport cameras come to drawn geometry, in meters. |
| SetZoomOutLimit | Set how far viewport cameras zoom out from the globe, as the share of the view’s height the body’s disc spans where a zoom out stops. |
| ZoomBy | Zoom viewport cameras toward the middle of their view by a number of scroll wheel notches. |
| Type | Description |
|---|---|
| CameraDestination | |
| CameraPose | Camera placement in geographic coordinates. |
| CameraTarget | Position the camera and its target explicitly. Up follows the displayed map normal at the eye. Coincident positions fail. A vertical view uses the local east direction to fix roll. |
| CameraView | Where a camera stands over the map. |
| FlightStage | How far a flight from one map’s body to another has come. |
| FlightState | The last flight a camera was sent on with geo.viewport.camera.fly_to. |
| FlyTo | Animate one viewport to a position on a map, acquiring geographic camera control. Zero duration places the camera on the next frame. An omitted duration uses three seconds. A flight to another map crosses on the globe and lands in the view the camera set out in. A flight asked for during a switch between the views starts at once, and the switch carries the camera to it. |
| GetClearance | Read how near one viewport camera comes to drawn geometry, in meters, as geo.viewport.camera.set_clearance describes it. |
| GetClearanceResponse | |
| GetFlight | Read how far the last flight geo.viewport.camera.fly_to sent a viewport on has come. |
| GetFlightResponse | |
| GetLocation | Read where one viewport camera stands over the map, and the ground under the middle of its view. |
| GetLocationResponse | |
| GetZoomOutLimit | Read how far one viewport camera zooms out from the globe, as geo.viewport.camera.set_zoom_out_limit describes it. |
| GetZoomOutLimitResponse | |
| LookAt | Frame a geographic target from a range in meters. A camera in the flat view lands straight over the target at the range with north up, whatever heading and pitch are asked for. |
| OrbitTo | Fails unless longitude and latitude name a place. Turn viewport cameras about the ground in the middle of their view, which stays in the middle all the way, to look at it from a new heading, pitch or range. |
| SetClearance | Set how near viewport cameras come to drawn geometry, in meters. |
| SetZoomOutLimit | Set how far viewport cameras zoom out from the globe, as the share of the view’s height the body’s disc spans where a zoom out stops. |
| ZoomBy | Zoom viewport cameras toward the middle of their view by a number of scroll wheel notches. |
FlyTo
RPC
FlyTo(request: geo.viewport.camera.FlyTo) -> google.protobuf.EmptyAnimate one viewport to a position on a map, acquiring geographic camera control. Zero duration places the camera on the next frame. An omitted duration uses three seconds. A flight to another map crosses on the globe and lands in the view the camera set out in. A flight asked for during a switch between the views starts at once, and the switch carries the camera to it.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.FlyTo.
Returns google.protobuf.Empty.
map : scene.Node
destination : geo.viewport.camera.CameraDestination
duration_seconds optional : double
viewport optional : string
GetClearance
RPC
GetClearance(request: geo.viewport.camera.GetClearance) -> geo.viewport.camera.GetClearanceResponseRead how near one viewport camera comes to drawn geometry, in meters, as
geo.viewport.camera.set_clearance describes it.
Fails unless exactly one viewport matches viewport.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.GetClearance.
Returns geo.viewport.camera.GetClearanceResponse.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
GetFlight
RPC
GetFlight(request: geo.viewport.camera.GetFlight) -> geo.viewport.camera.GetFlightResponseRead how far the last flight geo.viewport.camera.fly_to sent a viewport on has come.
Returns nothing when the viewport’s camera was never sent on one. Fails unless exactly one
viewport matches viewport.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.GetFlight.
Returns geo.viewport.camera.GetFlightResponse.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
GetLocation
RPC
GetLocation(request: geo.viewport.camera.GetLocation) -> geo.viewport.camera.GetLocationResponseRead where one viewport camera stands over the map, and the ground under the middle of its view.
The reading uses the conventions geo.viewport.camera.fly_to takes, so passing it back
puts the camera where it was. Returns nothing before the map has been built. Fails unless
exactly one viewport matches viewport.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.GetLocation.
Returns geo.viewport.camera.GetLocationResponse.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
GetZoomOutLimit
RPC
GetZoomOutLimit(request: geo.viewport.camera.GetZoomOutLimit) -> geo.viewport.camera.GetZoomOutLimitResponseRead how far one viewport camera zooms out from the globe, as
geo.viewport.camera.set_zoom_out_limit describes it.
Fails unless exactly one viewport matches viewport.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.GetZoomOutLimit.
Returns geo.viewport.camera.GetZoomOutLimitResponse.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
OrbitTo
RPC
OrbitTo(request: geo.viewport.camera.OrbitTo) -> google.protobuf.EmptyFails unless longitude and latitude name a place.
Turn viewport cameras about the ground in the middle of their view, which stays in the middle
all the way, to look at it from a new heading, pitch or range.
The cameras read where they stand and what they look at themselves, so a caller does not pass back a reading that may be a frame old. The heading and pitch ease from where they are, the heading the short way round, and the range evenly in its logarithm, starting and ending at rest. Fails where the middle of a view shows no ground, and in the flat view, which only pans and zooms.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.OrbitTo.
Returns google.protobuf.Empty.
heading optional : double
Degrees clockwise from north to look toward. Absent, the heading now.
pitch optional : double
Degrees below the horizon to look down at the ground, from 0 to 90. Absent, the pitch now.
range_scale optional : double
How many times as far from the ground to stand. Absent, as far as now.
duration_seconds optional : double
How long the turn takes. Zero turns at once on the next frame. Absent, three seconds.
viewport optional : string
Label of the viewports to turn. Absent, exactly one viewport must exist.
SetClearance
RPC
SetClearance(request: geo.viewport.camera.SetClearance) -> google.protobuf.EmptySet how near viewport cameras come to drawn geometry, in meters.
The clearance is the one distance a camera keeps from what it would hit: the ground under it,
an object it zooms toward, and the ground under the flights
geo.viewport.camera.fly_to start. A camera
keeps it on every map it is put on, including maps opened later. A camera never given a
clearance keeps 5 m. The setting belongs to the viewport, so it is not saved in the project and
undo does not take it back.
Fails without changing anything unless meters is a finite number above zero and at most
100,000.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.SetClearance.
Returns google.protobuf.Empty.
meters : double
Meters the camera keeps from drawn geometry.
viewport optional : string
Label of the viewports to change. Absent, exactly one viewport must exist.
SetZoomOutLimit
RPC
SetZoomOutLimit(request: geo.viewport.camera.SetZoomOutLimit) -> google.protobuf.EmptySet how far viewport cameras zoom out from the globe, as the share of the view’s height the body’s disc spans where a zoom out stops.
The limit is a share of the view rather than a distance, so it stops a camera over each body at a distance in proportion to that body’s radius, and at the same size on the screen through any field of view. A camera keeps it on every map it is put on, including maps opened later. A camera never given a limit stops where the body’s map, pole to pole, fills the height of the view, about 0.64 of it. A flat map stops a zoom out at its own edges whatever this is set to. The setting belongs to the viewport, so it is not saved in the project and undo does not take it back.
Fails without changing anything unless span is a number from 0.00001 to 1.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.SetZoomOutLimit.
Returns google.protobuf.Empty.
span : double
The share of the view’s height the body’s disc spans where a zoom out stops.
viewport optional : string
Label of the viewports to change. Absent, exactly one viewport must exist.
ZoomBy
RPC
ZoomBy(request: geo.viewport.camera.ZoomBy) -> google.protobuf.EmptyZoom viewport cameras toward the middle of their view by a number of scroll wheel notches.
The zoom is the one a scroll wheel over the middle of the view makes, with the same limits, speed and easing, in the 2D view as in 3D, and over the sky as over the ground. Steps sent while an earlier zoom is still under way add to it.
Service method: spatialengine.v1.geo.viewport.camera.GeoViewportCamera.ZoomBy.
Returns google.protobuf.Empty.
steps : double
How many notches to zoom: in for a positive count, out for a negative one. A fraction zooms that share of a notch.
viewport optional : string
Label of the viewports to zoom. Absent, exactly one viewport must exist.
CameraDestination
Message
Choose one of: camera_pose, look_at, camera_target.
camera_pose optional : geo.viewport.camera.CameraPose
look_at optional : geo.viewport.camera.LookAt
camera_target optional : geo.viewport.camera.CameraTarget
CameraPose
Message
Camera placement in geographic coordinates.
camera_position : geo.GeoPosition
The camera’s geographic position, not its target. Omitted elevation uses displayed ground.
camera_heading : double
Degrees clockwise from north at the camera.
camera_pitch : double
Degrees below the camera’s local horizon: 0 horizontal, 90 down, and -90 up.
CameraTarget
Message
Position the camera and its target explicitly. Up follows the displayed map normal at the eye. Coincident positions fail. A vertical view uses the local east direction to fix roll.
camera_position : geo.GeoPosition
target : geo.GeoPosition
CameraView
Message
Where a camera stands over the map.
camera_position : geo.GeoPosition
camera_heading : double
Degrees clockwise from north.
camera_pitch : double
Degrees below the horizon the camera looks down, so 90 looks straight down.
center optional : geo.GeoPosition
The displayed ground under the viewport center, absent over sky or before presentation.
map optional : scene.Node
The node geo.map.spawn_map answered for the map the camera stands on, absent while it
stands on none.
flat_view_span optional : double
In the flat view, meters of ground the view’s height spans at the middle of the view, which
follows the zoom where the height of camera_position does not. It depends on neither the
window’s size nor a field of view, and LookAt.flat_view_span restores it. Absent in the
3D view and during a switch between the views.
FlightStage
Enum
How far a flight from one map’s body to another has come.
FLIGHT_STAGE_DEPARTING = 0
Asked for, and not started yet.
FLIGHT_STAGE_CLIMBING = 1
Climbing off the body the camera stood on.
FLIGHT_STAGE_CRUISING = 2
Crossing open space toward the other body.
FLIGHT_STAGE_LANDING = 3
The camera stands on the destination’s map and descends to its landing.
FLIGHT_STAGE_LANDED = 4
The camera has landed on the destination’s map.
FLIGHT_STAGE_CANCELED = 5
The flight ended before it reached the destination, such as when the map was deleted.
FlightState
Message
The last flight a camera was sent on with geo.viewport.camera.fly_to.
map : scene.Node
The map flown to.
stage : geo.viewport.camera.FlightStage
FlyTo
Message
Animate one viewport to a position on a map, acquiring geographic camera control. Zero duration places the camera on the next frame. An omitted duration uses three seconds. A flight to another map crosses on the globe and lands in the view the camera set out in. A flight asked for during a switch between the views starts at once, and the switch carries the camera to it.
map : scene.Node
destination : geo.viewport.camera.CameraDestination
duration_seconds optional : double
viewport optional : string
GetClearance
Message
Read how near one viewport camera comes to drawn geometry, in meters, as
geo.viewport.camera.set_clearance describes it.
Fails unless exactly one viewport matches viewport.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
GetClearanceResponse
Message
value optional : double
GetFlight
Message
Read how far the last flight geo.viewport.camera.fly_to sent a viewport on has come.
Returns nothing when the viewport’s camera was never sent on one. Fails unless exactly one
viewport matches viewport.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
GetFlightResponse
Message
value optional : geo.viewport.camera.FlightState
GetLocation
Message
Read where one viewport camera stands over the map, and the ground under the middle of its view.
The reading uses the conventions geo.viewport.camera.fly_to takes, so passing it back
puts the camera where it was. Returns nothing before the map has been built. Fails unless
exactly one viewport matches viewport.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
GetLocationResponse
Message
value optional : geo.viewport.camera.CameraView
GetZoomOutLimit
Message
Read how far one viewport camera zooms out from the globe, as
geo.viewport.camera.set_zoom_out_limit describes it.
Fails unless exactly one viewport matches viewport.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
GetZoomOutLimitResponse
Message
value optional : double
LookAt
Message
Frame a geographic target from a range in meters. A camera in the flat view lands straight over the target at the range with north up, whatever heading and pitch are asked for.
target : geo.GeoPosition
The point the camera faces. Omitted elevation uses displayed ground.
camera_range : double
Requested camera-to-target distance in ground meters. Flat projection scales scene distance.
Unless exact is true, ground clearance can increase the distance or steepen the viewing
angle.
camera_heading : double
Degrees clockwise from north at the target, measured in the direction the camera faces.
camera_pitch : double
Degrees below the target’s local horizon: 0 horizontal, 90 down, and -90 up.
exact optional : bool
True lands the camera at exactly this range, heading and pitch, as when restoring a view that was read back, however near the drawn ground that puts it, short of its clearance over the ground under it. A camera that would stand lower is raised straight up to the clearance without turning. Absent means false.
flat_view_span optional : double
Meters of ground the view’s height spans where a camera lands in the flat view, as
get_location reads flat_view_span. It takes the place of camera_range there, whatever
the window’s size and the field of view. Absent, the flat view frames what a 3D camera at
camera_range shows. The 3D view ignores it.
OrbitTo
Message
Fails unless longitude and latitude name a place.
Turn viewport cameras about the ground in the middle of their view, which stays in the middle
all the way, to look at it from a new heading, pitch or range.
The cameras read where they stand and what they look at themselves, so a caller does not pass back a reading that may be a frame old. The heading and pitch ease from where they are, the heading the short way round, and the range evenly in its logarithm, starting and ending at rest. Fails where the middle of a view shows no ground, and in the flat view, which only pans and zooms.
heading optional : double
Degrees clockwise from north to look toward. Absent, the heading now.
pitch optional : double
Degrees below the horizon to look down at the ground, from 0 to 90. Absent, the pitch now.
range_scale optional : double
How many times as far from the ground to stand. Absent, as far as now.
duration_seconds optional : double
How long the turn takes. Zero turns at once on the next frame. Absent, three seconds.
viewport optional : string
Label of the viewports to turn. Absent, exactly one viewport must exist.
SetClearance
Message
Set how near viewport cameras come to drawn geometry, in meters.
The clearance is the one distance a camera keeps from what it would hit: the ground under it,
an object it zooms toward, and the ground under the flights
geo.viewport.camera.fly_to start. A camera
keeps it on every map it is put on, including maps opened later. A camera never given a
clearance keeps 5 m. The setting belongs to the viewport, so it is not saved in the project and
undo does not take it back.
Fails without changing anything unless meters is a finite number above zero and at most
100,000.
meters : double
Meters the camera keeps from drawn geometry.
viewport optional : string
Label of the viewports to change. Absent, exactly one viewport must exist.
SetZoomOutLimit
Message
Set how far viewport cameras zoom out from the globe, as the share of the view’s height the body’s disc spans where a zoom out stops.
The limit is a share of the view rather than a distance, so it stops a camera over each body at a distance in proportion to that body’s radius, and at the same size on the screen through any field of view. A camera keeps it on every map it is put on, including maps opened later. A camera never given a limit stops where the body’s map, pole to pole, fills the height of the view, about 0.64 of it. A flat map stops a zoom out at its own edges whatever this is set to. The setting belongs to the viewport, so it is not saved in the project and undo does not take it back.
Fails without changing anything unless span is a number from 0.00001 to 1.
span : double
The share of the view’s height the body’s disc spans where a zoom out stops.
viewport optional : string
Label of the viewports to change. Absent, exactly one viewport must exist.
ZoomBy
Message
Zoom viewport cameras toward the middle of their view by a number of scroll wheel notches.
The zoom is the one a scroll wheel over the middle of the view makes, with the same limits, speed and easing, in the 2D view as in 3D, and over the sky as over the ground. Steps sent while an earlier zoom is still under way add to it.
steps : double
How many notches to zoom: in for a positive count, out for a negative one. A fraction zooms that share of a notch.
viewport optional : string
Label of the viewports to zoom. Absent, exactly one viewport must exist.