Class MapService
Definition
- Namespace:
- Tizen.Maps
- Assembly:
- Tizen.Maps.dll
- API Level:
- 3
Map service class for service request.
C#Copypublic class MapService : IDisposable
- Inheritance
-
System.ObjectMapService
- Implements
-
System.IDisposable
Constructors
MapService(String, String)
Creates a new maps service object for given service provider.
Declaration
C#Copypublic MapService(string serviceProvider, string serviceProviderKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | serviceProvider | A string representing the name of the map service provider. |
System.String | serviceProviderKey | A string representing a certificate key to use the map service provider. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the required feature is not supported. |
System.ArgumentException | Thrown when parameters are invalid. |
System.InvalidOperationException | Thrown when a native operation failed to allocate memory and connect to the service. |
UnauthorizedAccessException | Thrown when application does not have some privilege to access this method. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/mapservicehttp://tizen.org/privilege/network.get
Properties
GeocodePreferences
Gets the search preferences used for GeocodeRequest or ReverseGeocodeRequest.
Declaration
C#Copypublic IGeocodePreference GeocodePreferences { get; }
Property Value
Type | Description |
---|---|
IGeocodePreference |
API Level: 3
Declaration
C#Copypublic PlaceFilter PlaceSearchFilter { get; set; }
Property Value
Type | Description |
---|---|
PlaceFilter |
API Level: 3
Declaration
C#Copypublic IPlaceSearchPreference PlaceSearchPreferences { get; }
Property Value
Type | Description |
---|---|
IPlaceSearchPreference |
API Level: 3
Declaration
C#Copypublic SearchPreference Preferences { get; set; }
Property Value
Type | Description |
---|---|
SearchPreference |
API Level: 3
Declaration
C#Copypublic string Provider { get; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
Declaration
C#Copypublic string ProviderKey { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Typically, the provider key is issued by each maps provider after signing up for a plan in the website. Depending on the plan and its provider which you have signed, you might have to pay for the network traffic.
API Level: 3
Declaration
C#Copypublic static IEnumerable<string> Providers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | The list of map service providers. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the required feature is not supported. |
UnauthorizedAccessException | Thrown when application does not have privilege to access this property. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/mapservice
Declaration
C#Copypublic IRouteSearchPreference RouteSearchPreferences { get; }
Property Value
Type | Description |
---|---|
IRouteSearchPreference |
API Level: 3
Declaration
C#Copypublic bool UserConsented { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/mapservice
Methods
CreateGeocodeRequest(String)
Creates a geocode search request for the given free-formed address string.
Declaration
C#Copypublic GeocodeRequest CreateGeocodeRequest(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | A string representing free-formed address. |
Returns
Type | Description |
---|---|
GeocodeRequest | Returns a GeocodeRequest object created with an address string. |
API Level: 3
CreateGeocodeRequest(String, Area)
Creates a geocode search request for the given free-formed address string, within the specified boundary.
Declaration
C#Copypublic GeocodeRequest CreateGeocodeRequest(string address, Area boundary)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | A string representing the free-formed address. |
Area | boundary | An instance of Area object representing the interested area. |
Returns
Type | Description |
---|---|
GeocodeRequest | Returns a GeocodeRequest object created with an address string and a specified boundary. |
See Also
API Level: 3
CreateGeocodeRequest(PlaceAddress)
Creates a geocode search request for the given structured address.
Declaration
C#Copypublic GeocodeRequest CreateGeocodeRequest(PlaceAddress address)
Parameters
Type | Name | Description |
---|---|---|
PlaceAddress | address | A string representing the address of interest. |
Returns
Type | Description |
---|---|
GeocodeRequest | Returns a GeocodeRequest object created with a structured address. |
API Level: 3
CreateMultiReverseGeocodeRequest(IEnumerable<Geocoordinates>)
Creates a reverse geocode search request for the given position coordinates list.
Declaration
C#Copypublic MultiReverseGeocodeRequest CreateMultiReverseGeocodeRequest(IEnumerable<Geocoordinates> coordinates)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Geocoordinates> | coordinates | Coordinates list with [2 ~ 100] coordinates. |
Returns
Type | Description |
---|---|
MultiReverseGeocodeRequest | Returns a MultiReverseGeocodeRequest object created with a list of location coordinates. |
API Level: 3
CreatePlaceSearchRequest(String, Area)
Creates a place search request for a free-formed address within the boundary.
Declaration
C#Copypublic PlaceSearchRequest CreatePlaceSearchRequest(string address, Area boundary)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | A string which represents a free-formed address. |
Area | boundary | An instance of area object representing an area to search interested places. |
Returns
Type | Description |
---|---|
PlaceSearchRequest | Returns a PlaceSearchRequest object created with an address string and a specified boundary. |
API Level: 3
CreatePlaceSearchRequest(Area)
Creates a place search request for places within a specified boundary.
Declaration
C#Copypublic PlaceSearchRequest CreatePlaceSearchRequest(Area boundary)
Parameters
Type | Name | Description |
---|---|---|
Area | boundary | An instance of Area object representing and area to search interested places. |
Returns
Type | Description |
---|---|
PlaceSearchRequest | Returns a PlaceSearchRequest object created with a specified boundary. |
API Level: 3
CreatePlaceSearchRequest(Geocoordinates, Int32)
Creates a place search request for a specified search radius around a given coordinates position.
Declaration
C#Copypublic PlaceSearchRequest CreatePlaceSearchRequest(Geocoordinates coordinates, int distance)
Parameters
Type | Name | Description |
---|---|---|
Geocoordinates | coordinates | Geographical coordinates of the center. |
Int32 | distance | A double value representing the radius of an area to search places. |
Returns
Type | Description |
---|---|
PlaceSearchRequest | Returns a PlaceSearchRequest object created with the location coordinates and search radius. |
API Level: 3
CreateReverseGeocodeRequest(Double, Double)
Creates a reverse geocode search request for the given latitude and longitude.
Declaration
C#Copypublic ReverseGeocodeRequest CreateReverseGeocodeRequest(double latitude, double longitude)
Parameters
Type | Name | Description |
---|---|---|
System.Double | latitude | Latitude of the interested place. |
System.Double | longitude | Longitude of the interested place. |
Returns
Type | Description |
---|---|
ReverseGeocodeRequest | Returns a ReverseGeocodeRequest object created with the location coordinates. |
API Level: 3
CreateRouteSearchRequest(Geocoordinates, Geocoordinates)
Creates a route search request for the origin and destination points.
Declaration
C#Copypublic RouteSearchRequest CreateRouteSearchRequest(Geocoordinates from, Geocoordinates to)
Parameters
Type | Name | Description |
---|---|---|
Geocoordinates | from | Starting point. |
Geocoordinates | to | Destination. |
Returns
Type | Description |
---|---|
RouteSearchRequest | Returns a RouteSearchRequest object created with the origin and destination coordinates. |
API Level: 3
Declaration
C#Copypublic void Dispose()
API Level: 3
Dispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | If true, managed and unmanaged resources can be disposed, otherwise only unmanaged resources can be disposed. |
API Level: 3
Declaration
C#Copyprotected void Finalize()
Declaration
C#Copypublic bool IsSupported(ServiceData data)
Parameters
Type | Name | Description |
---|---|---|
ServiceData | data | Data feature to check. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the maps service supports a data feature, otherwise false. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the required feature is not supported. |
UnauthorizedAccessException | Thrown when application does not have some privilege to access this method. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/mapservice
Declaration
C#Copypublic bool IsSupported(ServiceRequestType type)
Parameters
Type | Name | Description |
---|---|---|
ServiceRequestType | type | Request type to check |
Returns
Type | Description |
---|---|
Boolean | Returns true if the maps service supports a request, otherwise false. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the required feature is not supported. |
UnauthorizedAccessException | Thrown when application does not have some privilege to access this method. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/mapservice
Declaration
C#Copypublic Task<bool> RequestUserConsent()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Boolean> | Returns true if user agreed that the application can use maps data, otherwise false. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the required feature is not supported. |
UnauthorizedAccessException | Thrown when application does not have some privilege to access this method. |