Class MapControl
Inheritance
System.Object
MapControl
Assembly: Mapsui.UI.Wpf.dll
Syntax
public class MapControl : INotifyPropertyChanged, IMapControl, Grid
Constructors
|
Improve this Doc
View Source
MapControl()
Declaration
Properties
|
Improve this Doc
View Source
Map
Map holding data for which is shown in this MapControl
Declaration
public Map Map { get; set; }
Property Value
|
Improve this Doc
View Source
Navigator
Handles all manipulations of the map viewport
Declaration
public INavigator Navigator { get; set; }
Property Value
|
Improve this Doc
View Source
PixelDensity
Declaration
public float PixelDensity { get; }
Property Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Renderer
Renderer that is used from this MapControl
Declaration
public IRenderer Renderer { get; set; }
Property Value
|
Improve this Doc
View Source
RenderMode
Declaration
public RenderMode RenderMode { get; set; }
Property Value
|
Improve this Doc
View Source
ReSnapRotationDegrees
With how many degrees from 0 should map snap to 0 degrees
Declaration
public double ReSnapRotationDegrees { get; set; }
Property Value
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
UnSnapRotationDegrees
After how many degrees start rotation to take place
Declaration
public double UnSnapRotationDegrees { get; set; }
Property Value
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
Viewport
Viewport holding information about visible part of the map. Viewport can never be null.
Declaration
public IReadOnlyViewport Viewport { get; }
Property Value
|
Improve this Doc
View Source
WpfCanvas
Declaration
public Canvas WpfCanvas { get; }
Property Value
Methods
|
Improve this Doc
View Source
CallHomeIfNeeded()
Declaration
public void CallHomeIfNeeded()
|
Improve this Doc
View Source
Clear()
Clear cache and repaint map
Declaration
|
Improve this Doc
View Source
GetMapInfo(Point, Int32)
Check, if a feature at a given screen position is hit
Declaration
public MapInfo GetMapInfo(Point screenPosition, int margin = 0)
Parameters
Type |
Name |
Description |
Point |
screenPosition |
Screen position to check for widgets and features
|
System.Int32 |
margin |
An optional extra margin around the feature to enlarge the hit area.
|
Returns
|
Improve this Doc
View Source
GetSnapshot(IEnumerable<ILayer>)
Declaration
public byte[] GetSnapshot(IEnumerable<ILayer> layers = null)
Parameters
Type |
Name |
Description |
IEnumerable<ILayer> |
layers |
|
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
OnPropertyChanged(String)
Declaration
protected void OnPropertyChanged(string propertyName = "")
Parameters
Type |
Name |
Description |
System.String |
propertyName |
|
|
Improve this Doc
View Source
OnRender(DrawingContext)
Declaration
protected override void OnRender(DrawingContext dc)
Parameters
Type |
Name |
Description |
DrawingContext |
dc |
|
|
Improve this Doc
View Source
OpenBrowser(String)
Declaration
public void OpenBrowser(string url)
Parameters
Type |
Name |
Description |
System.String |
url |
|
|
Improve this Doc
View Source
Refresh()
Refresh data of the map and than repaint it
Declaration
|
Improve this Doc
View Source
RefreshData()
Refresh data of Map, but don't paint it
Declaration
public void RefreshData()
|
Improve this Doc
View Source
RefreshGraphics()
Declaration
public void RefreshGraphics()
|
Improve this Doc
View Source
ToDeviceIndependentUnits(Point)
Converts coordinates in pixels to device independent units (or DIP or DP).
Declaration
public Point ToDeviceIndependentUnits(Point coordinateInPixels)
Parameters
Type |
Name |
Description |
Point |
coordinateInPixels |
Coordinate in pixels
|
Returns
Type |
Description |
Point |
Coordinate in device independent units (or DIP or DP)
|
|
Improve this Doc
View Source
ToPixels(Point)
Converts coordinates in device independent units (or DIP or DP) to pixels.
Declaration
public Point ToPixels(Point coordinateInDeviceIndependentUnits)
Parameters
Type |
Name |
Description |
Point |
coordinateInDeviceIndependentUnits |
Coordinate in device independent units (or DIP or DP)
|
Returns
Type |
Description |
Point |
Coordinate in pixels
|
|
Improve this Doc
View Source
Unsubscribe()
Unsubscribe from map events
Declaration
public void Unsubscribe()
|
Improve this Doc
View Source
ZoomIn()
Declaration
|
Improve this Doc
View Source
ZoomOut()
Declaration
|
Improve this Doc
View Source
ZoomToBox(Point, Point)
Declaration
public void ZoomToBox(Point beginPoint, Point endPoint)
Parameters
Type |
Name |
Description |
Point |
beginPoint |
|
Point |
endPoint |
|
Events
|
Improve this Doc
View Source
FeatureInfo
Declaration
public event EventHandler<FeatureInfoEventArgs> FeatureInfo
Event Type
|
Improve this Doc
View Source
Info
Called whenever a feature in one of the layers in InfoLayers is hitten by a click
Declaration
public event EventHandler<MapInfoEventArgs> Info
Event Type
|
Improve this Doc
View Source
PropertyChanged
Called whenever a property is changed
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
PropertyChangedEventHandler |
|
|
Improve this Doc
View Source
ViewChanged
Declaration
public event EventHandler<ViewChangedEventArgs> ViewChanged
Event Type
|
Improve this Doc
View Source
ViewportInitialized
Called when the viewport is initialized
Declaration
public event EventHandler ViewportInitialized
Event Type
Type |
Description |
EventHandler |
|
Implements
Grid