Interface IViewportController
The geographic area and scale the session renders. Backs the
set_viewport tool. Renderer-neutral: the viewport is expressed
geographically (centre, scale denominator, rotation), not in a renderer's
projected units, and the output pixel size is a render argument
(see IImageRenderer), not viewport state — so one viewport can
be rendered at any size.
public interface IViewportController
Remarks
A null Current means "no explicit viewport" — the host auto-fits the extent of the loaded datasets at render time. Calling Set(MapViewport) pins an explicit viewport; SetToBounds(BoundingBox) frames a bounding box (the host resolves the scale for its own render surface).
Properties
Current
The explicit viewport, or null when the host is auto-fitting the loaded datasets.
MapViewport? Current { get; }
Property Value
Methods
Set(MapViewport)
Pins an explicit geographic viewport.
void Set(MapViewport viewport)
Parameters
viewportMapViewportThe centre, scale, and rotation to render.
SetToBounds(BoundingBox)
Frames a geographic bounding box, letting the host compute the scale that fits it to the render surface.
void SetToBounds(BoundingBox bounds)
Parameters
boundsBoundingBoxThe WGS-84 bounding box to frame.