Class ViewportLimiter
Inheritance
System.Object
ViewportLimiter
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mapsui.UI
Assembly: Mapsui.dll
Syntax
public class ViewportLimiter : IViewportLimiter
Properties
| Improve this Doc View SourcePanLimits
Set this property in combination KeepCenterWithinExtents or KeepViewportWithinExtents. If PanLimits is not set, Map.Extent will be used as restricted extent.
Declaration
public BoundingBox PanLimits { get; set; }
Property Value
Type | Description |
---|---|
BoundingBox |
ZoomLimits
Pair of the limits for the resolutions (smallest and biggest). If ZoomMode is set to anything else than None, resolution is kept between these values.
Declaration
public MinMax ZoomLimits { get; set; }
Property Value
Type | Description |
---|---|
MinMax |
ZoomMode
Zoom mode to use, when map is zoomed
Declaration
public ZoomMode ZoomMode { get; set; }
Property Value
Type | Description |
---|---|
ZoomMode |
Methods
| Improve this Doc View SourceLimit(IViewport, IReadOnlyList<Double>, BoundingBox)
Declaration
public void Limit(IViewport viewport, IReadOnlyList<double> mapResolutions, BoundingBox mapEnvelope)
Parameters
Type | Name | Description |
---|---|---|
IViewport | viewport | |
System.Collections.Generic.IReadOnlyList<System.Double> | mapResolutions | |
BoundingBox | mapEnvelope |
LimitExtent(IViewport, BoundingBox)
Declaration
public void LimitExtent(IViewport viewport, BoundingBox mapEnvelope)
Parameters
Type | Name | Description |
---|---|---|
IViewport | viewport | |
BoundingBox | mapEnvelope |
LimitResolution(Double, Double, Double, IReadOnlyList<Double>, BoundingBox)
Declaration
public double LimitResolution(double resolution, double screenWidth, double screenHeight, IReadOnlyList<double> mapResolutions, BoundingBox mapEnvelope)
Parameters
Type | Name | Description |
---|---|---|
System.Double | resolution | |
System.Double | screenWidth | |
System.Double | screenHeight | |
System.Collections.Generic.IReadOnlyList<System.Double> | mapResolutions | |
BoundingBox | mapEnvelope |
Returns
Type | Description |
---|---|
System.Double |