Interface IMapControl
Inherited Members
Namespace: Mapsui.UI
Assembly: Mapsui.dll
Syntax
public interface IMapControl : IDisposableProperties
| Edit this page View SourceMap
Declaration
Map Map { get; set; }Property Value
| Type | Description | 
|---|---|
| Map | 
Methods
| Edit this page View SourceGetMapInfo(ScreenPosition, IEnumerable<ILayer>)
Check, if a feature at a given screen position is hit.
Declaration
MapInfo GetMapInfo(ScreenPosition screenPosition, IEnumerable<ILayer> layers)Parameters
| Type | Name | Description | 
|---|---|---|
| ScreenPosition | screenPosition | Screen position to check for widgets and features. | 
| IEnumerable<ILayer> | layers | The layers to query. | 
Returns
| Type | Description | 
|---|---|
| MapInfo | 
GetPixelDensity()
Returns the number of pixels per device independent unit
Declaration
float? GetPixelDensity()Returns
| Type | Description | 
|---|---|
| float? | 
GetSnapshot(IEnumerable<ILayer>?, RenderFormat, int)
Create a snapshot form map as PNG image
Declaration
byte[] GetSnapshot(IEnumerable<ILayer>? layers = null, RenderFormat renderFormat = RenderFormat.Png, int quality = 100)Parameters
| Type | Name | Description | 
|---|---|---|
| IEnumerable<ILayer> | layers | Layers that should be included in snapshot | 
| RenderFormat | renderFormat | render format | 
| int | quality | default quality is 90 is applicable for webp and jpg | 
Returns
| Type | Description | 
|---|---|
| byte[] | Byte array with snapshot in png format. If there are any problems than returns null. | 
InvalidateCanvas()
Declaration
void InvalidateCanvas()OpenInBrowser(string)
Declaration
void OpenInBrowser(string url)Parameters
| Type | Name | Description | 
|---|---|---|
| string | url | 
Refresh(ChangeType)
Declaration
void Refresh(ChangeType changeType = ChangeType.Discrete)Parameters
| Type | Name | Description | 
|---|---|---|
| ChangeType | changeType | 
RefreshData(ChangeType)
Declaration
void RefreshData(ChangeType changeType = ChangeType.Discrete)Parameters
| Type | Name | Description | 
|---|---|---|
| ChangeType | changeType | 
RefreshGraphics()
Declaration
void RefreshGraphics()ToCoordinateInDeviceIndependentUnits(MPoint)
Converts coordinates in raw pixels to device independent units (or DIP or DP).
Declaration
MPoint ToCoordinateInDeviceIndependentUnits(MPoint coordinateInPixels)Parameters
| Type | Name | Description | 
|---|---|---|
| MPoint | coordinateInPixels | Coordinate in pixels | 
Returns
| Type | Description | 
|---|---|
| MPoint | Coordinate in device independent units (or DIP or DP) | 
ToCoordinateInRawPixels(MPoint)
Converts coordinates in device independent units (or DIP or DP) to raw pixels.
Declaration
MPoint ToCoordinateInRawPixels(MPoint coordinateInDeviceIndependentUnits)Parameters
| Type | Name | Description | 
|---|---|---|
| MPoint | coordinateInDeviceIndependentUnits | Coordinate in device independent units (or DIP or DP) | 
Returns
| Type | Description | 
|---|---|
| MPoint | Coordinate in raw pixels | 
Unsubscribe()
Declaration
void Unsubscribe()Events
| Edit this page View SourceInfo
Declaration
event EventHandler<MapInfoEventArgs> InfoEvent Type
| Type | Description | 
|---|---|
| EventHandler<MapInfoEventArgs> |