Class MapView
Definition
- Assembly:
- Tizen.Maps.dll
Map View class to show a map on the screen.
public class MapView : Layout, IAccessibleObject, IDisposable
- Inheritance
- Implements
-
IDisposable
Constructors
View SourceMapView(EvasObject, MapService)
Creates a view and links it to the instance of a map service.
Declaration
public MapView(EvasObject parent, MapService service)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | An instance of EvasObject object for which a map view will be drawn. |
MapService | service | An instance of MapService object. |
Properties
View SourceBuildingsEnabled
Indicates whether the map should show the 3D buildings layer.
Declaration
public bool BuildingsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
Center
Gets or sets geographical coordinates for map view's center.
Declaration
public Geocoordinates Center { get; set; }
Property Value
Type | Description |
---|---|
Geocoordinates |
Children
Gets a list of the map object added to map view.
Declaration
public IEnumerable<MapObject> Children { get; }
Property Value
Type | Description |
---|---|
IEnumerable<><MapObject> |
Language
Sets language of map view.
Declaration
public string Language { get; set; }
Property Value
Type | Description |
---|---|
string | The display language in the map. A language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. Each language tag is composed of one or more "subtags" separated by hyphens (-). Each subtag is composed of basic Latin letters or digits only. For example, "ko-KR" for Korean, "en-US" for American English. |
MapType
Gets or sets theme type of the map view.
Declaration
public MapTypes MapType { get; set; }
Property Value
Type | Description |
---|---|
MapTypes |
MaximumZoomLevel
Gets or sets the maximum zoom level.
Declaration
public int MaximumZoomLevel { get; set; }
Property Value
Type | Description |
---|---|
int | It is an integer value that limits maximum zoom level within a range of the current map plug-in support. |
MinimumZoomLevel
Gets or sets the minimum zoom level.
Declaration
public int MinimumZoomLevel { get; set; }
Property Value
Type | Description |
---|---|
int | It is an integer value that limits minimal zoom level within a range of the current map plug-in support. |
Orientation
Gets or sets the orientation on the map view.
Declaration
public double Orientation { get; set; }
Property Value
Type | Description |
---|---|
double | It is an integer value from 0 to 360 that indicates the orientation of the map view. |
PublicTransitEnabled
Indicates whether the map should show the public transit layer.
Declaration
public bool PublicTransitEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
ScaleBarEnabled
Indicates whether the scale-bar is enabled or not.
Declaration
public bool ScaleBarEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
TrafficEnabled
Indicates whether the map should show the traffic layer.
Declaration
public bool TrafficEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
ZoomLevel
Gets or sets the current zoom level.
Declaration
public int ZoomLevel { get; set; }
Property Value
Type | Description |
---|---|
int | It is an integer value representing the current zoom level. |
Methods
View SourceAdd(MapObject)
Adds a map object to map view.
Declaration
public void Add(MapObject child)
Parameters
Type | Name | Description |
---|---|---|
MapObject | child | An instance of the map object to be added. |
CaptureSnapshot(SnapshotType, int, string)
Captures a snapshot of the map view.
Declaration
public void CaptureSnapshot(SnapshotType type, int quality, string path)
Parameters
Type | Name | Description |
---|---|---|
SnapshotType | type | Type of file format. |
int | quality | An integer value representing the quality for encoding from 1 to 100. |
string | path | A string representing the file path for a snapshot. |
Dispose()
Releases all the resources used by this object.
Declaration
public void Dispose()
Dispose(bool)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | If true, managed and unmanaged resources can be disposed, otherwise only unmanaged resources can be disposed. |
~MapView()
Destroy the MapView object.
Declaration
protected ~MapView()
GeolocationToScreen(Geocoordinates)
Changes the geographical coordinates to screen coordinates.
Declaration
public Point GeolocationToScreen(Geocoordinates coordinates)
Parameters
Type | Name | Description |
---|---|---|
Geocoordinates | coordinates | Geographical coordinates. |
Returns
Type | Description |
---|---|
Point | Returns an instance of the screen coordinates on the current screen. |
Remove(MapObject)
Removes a map object from the map view.
Declaration
public void Remove(MapObject child)
Parameters
Type | Name | Description |
---|---|---|
MapObject | child | An instance of the map object to be removed. |
Remarks
Once removed, the child object will be become invalid.
RemoveAll()
Removes all map objects from the map view.
Declaration
public void RemoveAll()
ScreenToGeolocation(Point)
Changes the screen coordinates to geographical coordinates.
Declaration
public Geocoordinates ScreenToGeolocation(Point screenCoordinates)
Parameters
Type | Name | Description |
---|---|---|
Point | screenCoordinates | Screen coordinates. |
Returns
Type | Description |
---|---|
Geocoordinates | Returns an instance of the geographical coordinates object. |
Events
View SourceClicked
Adds or removes event handlers to deliver a clicked gesture event.
Declaration
public event EventHandler<MapGestureEventArgs> Clicked
Event Type
Type | Description |
---|---|
EventHandler<><MapGestureEventArgs> | Event handlers to get a clicked gesture event. |
DoubleClicked
Adds or removes event handlers to deliver a double-clicked gesture event.
Declaration
public event EventHandler<MapGestureEventArgs> DoubleClicked
Event Type
Type | Description |
---|---|
EventHandler<><MapGestureEventArgs> | Event handlers to get a double-clicked gesture event. |
LongPressed
Adds or removes event handlers to deliver a long-pressed gesture event.
Declaration
public event EventHandler<MapGestureEventArgs> LongPressed
Event Type
Type | Description |
---|---|
EventHandler<><MapGestureEventArgs> | Event handlers to get a long-pressed gesture event. |
Scrolled
Adds or removes event handlers to deliver a scrolled gesture event.
Declaration
public event EventHandler<MapGestureEventArgs> Scrolled
Event Type
Type | Description |
---|---|
EventHandler<><MapGestureEventArgs> | Event handlers to get a scrolled gesture event. |
TwoFingerClicked
Adds or removes event handlers to deliver a clicked gesture event with two-fingers.
Declaration
public event EventHandler<MapGestureEventArgs> TwoFingerClicked
Event Type
Type | Description |
---|---|
EventHandler<><MapGestureEventArgs> | Event handlers to get a clicked gesture event. |
TwoFingerRotated
Adds or removes event handlers to deliver a rotated gesture event.
Declaration
public event EventHandler<MapGestureEventArgs> TwoFingerRotated
Event Type
Type | Description |
---|---|
EventHandler<><MapGestureEventArgs> | Event handlers to get a rotated gesture event. |
TwoFingerZoomed
Adds or removes event handlers to deliver a zoomed gesture event.
Declaration
public event EventHandler<MapGestureEventArgs> TwoFingerZoomed
Event Type
Type | Description |
---|---|
EventHandler<><MapGestureEventArgs> | Event handlers to get a zoomed gesture event. |
ViewReady
Adds or removes event handlers to deliver an event representing a view ready to be used.
Declaration
public event EventHandler ViewReady
Event Type
Type | Description |
---|---|
EventHandler | Event handlers to get a view ready event. |