[Tizen.Maps] API guide 82/133182/6
authorchanywa <cbible.kim@samsung.com>
Fri, 9 Jun 2017 06:20:41 +0000 (15:20 +0900)
committerEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Tue, 20 Jun 2017 12:04:38 +0000 (15:04 +0300)
PS2: Reviewed
PS6: Fixed linking and removed white spaces

Change-Id: Icbcf51a7268a375b3669cf4f99c8d183a277d48e

org.tizen.guides/html/dotnet/location_sensors/maps_cs.htm [new file with mode: 0755]

diff --git a/org.tizen.guides/html/dotnet/location_sensors/maps_cs.htm b/org.tizen.guides/html/dotnet/location_sensors/maps_cs.htm
new file mode 100755 (executable)
index 0000000..d65d3bf
--- /dev/null
@@ -0,0 +1,828 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9" />
+<link rel="stylesheet" type="text/css" href="../../css/styles.css" />
+<link rel="stylesheet" type="text/css" href="../../css/snippet.css" />
+<script type="text/javascript" src="../../scripts/snippet.js"></script>
+<script type="text/javascript" src="../../scripts/jquery.util.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../scripts/common.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../scripts/core.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../scripts/search.js" charset="utf-8"></script>
+<title>Maps and Map Service</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile C#" src="../../images/mobile_s_cs.png"/> <img alt="TV C#" src="../../images/tv_s_cs.png"/></p>
+       </div>
+       <div id="toc_border">
+               <div id="toc">
+                       <p class="toc-title">Dependencies</p>
+                       <ul class="toc">
+                               <li>Tizen 4.0 and Higher for Mobile and TV</li>
+                       </ul>
+                       <p class="toc-title">Content</p>
+                       <ul class="toc">
+                               <li><a href="#geocode">Geocodes</a></li>
+                               <li><a href="#search_place">Place Search</a></li>
+                               <li><a href="#search_route">Route Search</a></li>
+                               <li><a href="#view">Map View Widget</a></li>
+                               <li><a href="#prerequisites">Prerequisites</a></li>
+                               <li><a href="#start">Starting the Map Service</a></li>
+                               <li><a href="#use_geocode">Using Geocode and Reverse Geocode Services</a></li>
+                               <li><a href="#use_search_place">Using the Place Search Service</a></li>
+                               <li><a href="#use_search_route">Using the Routing Service</a></li>
+                               <li><a href="#preference">Customizing the Service Requests</a></li>
+                               <li>Map view
+                               <ul class="toc">
+                                       <li><a href="#maps_view">Using the Map View</a></li>
+                                       <li><a href="#maps_object">Creating Map View Objects</a></li>
+                                       <li><a href="#maps_event">Managing Map View Events</a></li>
+                               </ul>
+                               </li>
+                       </ul>
+                       <p class="toc-title">Related Info</p>
+                       <ul class="toc">
+                               <li><a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Maps.html">Tizen.Maps Namespace</a></li>
+                       </ul>
+               </div>
+       </div>
+</div>
+
+       <div id="container"><div id="contents"><div class="content">
+
+<h1>Maps and Map Service</h1>
+<p>Map service features include geocoding, reverse geocoding, place searching, route calculation, and view widgets.</p>
+
+<p>The main Tizen.Maps namespace features are:</p>
+<ul>
+       <li>Discovering and selecting a map provider
+       <p>You can also <a href="#start">specify basic maps preferences</a>.</p></li>
+       <li>Geocoding and reverse geocoding
+       <p>You can <a href="#geocode">get the geocode</a> (geographical coordinates) of a place based on an address, or the reverse geocode (address) based on the geographical coordinates (latitude and longitude).</p></li>
+       <li>Searching places
+       <p>You can <a href="#search_place">query place information</a>, corresponding to specified search keys and filters.</p></li>
+       <li>Searching routes
+       <p>You can <a href="#search_route">query a route</a> that defines a path between a start and destination point, passing optionally through  specific intermediate locations and calculated using a specified transportation method.</p></li>
+       <li>Managing a map view widget
+       <p>With the <a href="#view">map view widget feature</a>, you can <a href="#maps_view">create a map view widget</a> and set various properties (such as theme, language, and traffic).</p>
+       <p>You can create objects, such as markers, polylines and polygons, in the widget. You can also receive responses about events over the widget, and get various data from the events.</p></li>
+</ul>
+
+<p>You can also <a href="#preference">customize service requests</a>.</p>
+
+<p id="supported_maps">The following map providers are supported:</p>
+       <ul>
+               <li><a href="https://developer.here.com" target="_blank">HERE Maps</a> based on the <a href="https://developer.here.com/rest-apis" target="_blank">HERE REST API</a>.
+               <p>To use the HERE Maps, set the provider name to "HERE" and <a href="../../native/location_sensors/here_credentials_n.htm">get the HERE API keys</a>.</p></li>
+               <li><a href="https://mapzen.com" target="_blank">Mapzen Maps</a> based on Mapzen services.
+               <p>To use the Mapzen Maps, set the provider name to "MAPZEN" and <a href="../../native/location_sensors/mapzen_credentials_n.htm">get the Mapzen API keys</a>.</p></li>
+       </ul>
+
+
+     <div class="note">
+        <strong>Note</strong>
+        To use the map service, you must get an access key to the map provider from the provider developer site. The service must be used according to the provider's Term of Use.
+    </div>
+
+<h2 id="geocode">Geocodes</h2>
+       <p>The following geocode request types are provided:</p>
+       <ul>
+               <li>Get place coordinates based on a free text address.</li>
+               <li>Get place coordinates based on a free text address within a specified geographical area.</li>
+               <li>Get place coordinates based on a structured address (a structure with fields, such as city, street, and building number).</li>
+       </ul>
+       <p>After performing the <a href="#use_geocode">geocode service request</a>, you receive the geocode response, which is a geographical location, specified with latitude and longitude values.</p>
+       <p>Only 1 type of reverse geocode request is provided:</p>
+       <ul>
+               <li>Get a structured address based on place coordinates.</li>
+       </ul>
+       <p>You can parse the reverse geocode response to use its details. The response contains structured address information, consisting of, for example, a street name, building number, city name, postal code, district name, state name, and country.</p>
+
+
+<h2 id="search_place">Place Search</h2>
+       <p>The following place search request types are provided:</p>
+       <ul>
+               <li>Query place information within a specific distance around a specified geographical location.</li>
+               <li>Query place information within a specified geographical area.</li>
+               <li>Query place information based on a free text address within a specified geographical area.</li>
+       </ul>
+       <p>After performing the <a href="#use_search_place">place service request</a>, you receive the place search response. You can parse the place search response to use its details. The response contains structured place information, consisting of, for example, a place ID, name and URL, address, geographical location and distance from the center of the search area, place category, rating, review, and image.</p>
+
+
+    <div class="note">
+        <strong>Note</strong>
+               Depending on the map provider, some types of place information can be unavailable.
+    </div>
+
+<h2 id="search_route">Route Search</h2>
+       <p>The following route search request types are provided:</p>
+       <ul>
+               <li>Query a route from a starting point to a destination specified as a geographical location.</li>
+               <li>Query a route passing through a number of geographical locations.</li>
+       </ul>
+       <p>After performing the <a href="#use_search_route">route service request</a>, you receive the route search response. You can parse the route calculation response to use its details. The response contains structured route information, consisting of, for example, a route ID, geographical coordinates of the start and destination points, route bounding box, transportation mode, and total distance and duration.</p>
+
+
+
+    <div class="note">
+        <strong>Note</strong>
+        Depending on the map provider, the route can be presented as a list of geographical points or segments. The segment list can also be presented as a list of geographical points or maneuvers.
+    </div>
+
+
+<h2 id="view" name="view">Map View Widget</h2>
+
+       <p>The map view widget feature includes drawing a map image on the map port, which is a specified rectangular area of the map application UI.</p>
+       <p>With the widget, you can:</p>
+       <ul>
+               <li>Show, move, and resize the widget.</li>
+               <li>Set the map view widget theme.</li>
+               <li>Enable a 3D building.</li>
+               <li>Enable traffic information.</li>
+               <li>Enable a scalebar.</li>
+               <li>Set a language for the widget.</li>
+       </ul>
+
+       <p>You can <a href="#maps_object">create objects in the widget</a>. The following view object types are provided:</p>
+       <ul>
+               <li>Marker based on a specified geographical location, image, and marker type.</li>
+               <li>Polyline based on a specified geographical locations, color, and width.</li>
+               <li>Polygon based on a specified geographical locations and color.</li>
+       </ul>
+       <p>The object properties can be changed after the object has been created.</p>
+
+       <p>The map view and map object can <a href="#maps_event">handle events</a>. Each object has handlers to invoke callback functions for selected events of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapObject.html">Tizen.Maps.MapObject</a> and <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html">Tizen.Maps.MapView</a> classes:</p>
+       <ul>
+               <li>Gestures
+               <ul>
+                       <li><code>Tizen.Maps.MapView.Scrolled</code>: Scroll gesture is detected over the widget.</li>
+                       <li><code>Tizen.Maps.MapView.ZoomChanged</code>: Zoom gesture is detected over the widget.</li>
+                       <li><code>Tizen.Maps.MapView.Clicked</code>: Click gesture is detected over the widget.</li>
+                       <li><code>Tizen.Maps.MapView.DoubleClicked</code>: Double-click gesture is detected over the widget.</li>
+                       <li><code>Tizen.Maps.MapView.TwoFingerPressed</code>: Two-finger press gesture is detected over the widget.</li>
+                       <li><code>Tizen.Maps.MapView.Rotated</code>: Rotation gesture is detected over the widget.</li>
+                       <li><code>Tizen.Maps.MapView.LongPressed</code>: Long-press gesture is detected over the widget.</li>
+               </ul></li>
+               <li>Others
+               <ul>
+                       <li><code>Tizen.Maps.MapView.ViewReady</code>: Map view widget is ready.</li>
+               </ul></li>
+       </ul>
+       <div class="note">
+           <strong>Note</strong>
+           To use the map view on Xamarin.Forms, use Xamarin.Forms.Maps.
+       </div>
+
+
+<h2 id="prerequisites">Prerequisites</h2>
+
+<p>To enable your application to use the map service functionality:</p>
+<ol>
+<li>
+<p>To use the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Maps.html">Tizen.Maps</a> namespace, the application has to request permission by adding the following privileges to the <code>tizen-manifest.xml</code> file:</p>
+<pre class="prettyprint">
+&lt;privileges&gt;
+   &lt;privilege&gt;http://tizen.org/privilege/mapservice&lt;/privilege&gt;
+   &lt;privilege&gt;http://tizen.org/privilege/internet&lt;/privilege&gt;
+   &lt;privilege&gt;http://tizen.org/privilege/network.get&lt;/privilege&gt;
+&lt;/privileges&gt;
+</pre>
+</li>
+<li><p>To use the methods and properties of the Tizen.Maps namespace, include it in your application:</p>
+<pre class="prettyprint">
+using Tizen.Maps;
+</pre>
+</li>
+</ol>
+
+<h2 id="start" name="start">Starting the Map Service</h2>
+
+<p>To start using the map service:</p>
+<ol>
+<li>The <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapService.html">Tizen.Maps.MapService</a> instance relies on a particular map provider. To get a list of available map providers, use the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapService.html#a92648f04d41226a7d44c2ab7f50b75be">Tizen.Maps.MapService.Providers</a> property:
+<pre class="prettyprint">
+var providerList = MapService.Providers;
+
+foreach (var provider in providerList)
+{
+    Log.Info("Tizen.Maps", $"Available Provider Name = {provider}");
+}
+</pre>
+</li>
+
+<li><p>Before you create a <code>Tizen.Maps.MapService</code> instance, make sure that the device user has consented to allow the map provider to use their location information. Depending on a map provider, a UI window to get user consent can be shown on the screen.</p>
+<p>If the consent request returns <code>false</code>, creating a <code>Tizen.Maps.MapService</code> instance fails.</p>
+<pre class="prettyprint">
+bool isConsented = await MapService.RequestUserConsent("MAPS_PROVIDER_NAME");
+Log.Info("Tizen.Maps", $"User consent for MAPS_PROVIDER_NAME = {isConsented}");
+</pre>
+</li>
+
+<li><p>Before you use the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Maps.html">Tizen.Maps</a> namespace, create a <code>Tizen.Maps.MapService</code> object instance.</p>
+<p>Set the provider name and provider key issued by the map provider:</p>
+<pre class="prettyprint">
+var maps = new MapService("MAPS_PROVIDER_NAME", "Your-Maps-Provider-Key");
+</pre>
+</li>
+
+<li>Check which services are supported by the <a href="#supported_maps">selected map provider</a> using the <code>IsSupported()</code> method of the <code>Tizen.Maps.MapService</code> class:
+<pre class="prettyprint">
+/// Check whether routing is available
+bool isRoutingSupported = maps.IsSupported(ServiceRequestType.SearchRoute);
+
+/// Check whether routing through specified waypoints is available
+bool isRoutingWaypointsSupported = maps.IsSupported(ServiceRequestType.SearchRouteWithWaypoints);
+</pre>
+<p>To check for the availability of other services, follow the same approach using the keys from the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Maps.html#acc8e146d5f333dee363ba96d8924843f">Tizen.Maps.ServiceRequestType</a> enumerator.</p>
+</li>
+
+<li>Optionally, check which data features are available for the desired services using the same <code>IsSupported()</code> method:
+<pre class="prettyprint">
+/// Check whether route path data is supported
+bool isRoutePathSupported = maps.IsSupported(ServiceData.RoutePath);
+
+/// Check whether segment path data is supported
+bool isRouteSegmentsPathSupported = maps.IsSupported(ServiceData.RouteSegmentsPath);
+
+/// Check whether segment maneuver data is supported
+bool isRouteSegmentsManeuversSupported = maps.IsSupported(ServiceData.RouteSegmentsManeuvers);
+</pre>
+<p>To check the availability of other data features, follow the same approach using the keys from the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Maps.html#ab2d73e5080312b1e9e59f6ddadc64db7">Tizen.Maps.ServiceData</a> enumerator.</p>
+</li>
+</ol>
+
+
+<h2 id="use_geocode" name="use_geocode">Using Geocode and Reverse Geocode Services</h2>
+
+<p>To retrieve a geocode of a specified place, or the place information corresponding to given geographic coordinates, use one of the following approaches. The service requests can be <a href="#preference">customized</a>.</p>
+
+<p>To retrieve a geocode:</p>
+<ul>
+<li>To retrieve a geocode, use a string of free-formed address for the <code>CreateGeocodeRequest()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapService.html">Tizen.Maps.MapService</a> object:
+<pre class="prettyprint">
+try
+{
+    var request = maps.CreateGeocodeRequest("Seoul, Seoul R&amp;D Campus");
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", result.ToString());
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+
+<li>To retrieve a geocode inside a specified area, use a string and an instance of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1Area.html">Tizen.Maps.Area</a> object for the <code>CreateGeocodeRequest()</code> method of the <code>Tizen.Maps.MapService</code> object:
+<pre class="prettyprint">
+try
+{
+    var area = new Area(new Geocoordinates(12.980260, 77.60653), new Geocoordinates(12.96738, 77.697405));
+    var request = maps.CreateGeocodeRequest("Bangalore", area);
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", result.ToString());
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+
+<li>To retrieve places specified as a structured address, use an instance of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1PlaceAddress.html">Tizen.Maps.PlaceAddress</a> object for the <code>CreateGeocodeRequest()</code> method of the <code>Tizen.Maps.MapService</code> object:
+<pre class="prettyprint">
+try
+{
+    var address = new PlaceAddress
+    {
+        Building = "Ub City", City = "Bengaluru", PostalCode = "560025", Country = "India"
+    };
+    var request = maps.CreateGeocodeRequest(address);
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", result.ToString());
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+</ul>
+
+
+<p>To retrieve a reverse geocode:</p>
+<ul>
+<li>To retrieve a reverse geocode of specified geographic coordinates, use latitude and longitude for the <code>CreateReverseGeocodeRequest()</code> method of the <code>Tizen.Maps.MapService</code> object:
+<pre class="prettyprint">
+try
+{
+    var request = maps.CreateReverseGeocodeRequest(12.975491, 77.697182);
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", result.ToString());
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+
+<li>To retrieve reverse geocodes of specified multiple geographic coordinates, use the <code>CreateMultiReverseGeocodeRequest()</code> method of the <code>Tizen.Maps.MapService</code> object:
+<pre class="prettyprint">
+try
+{
+    var request = maps.CreateMultiReverseGeocodeRequest(new List&lt;Geocoordinates>
+    {
+        new Geocoordinates(12.975491, 77.697182),
+        new Geocoordinates(48.85784, 2.29516),
+    });
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", result.ToString());
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+</ul>
+
+<h2 id="use_search_place" name="use_search_place">Using the Place Search Service</h2>
+
+<p>To search for a place with a diversity of search parameters, use one of the following approaches. The service requests can be <a href="#preference">customized</a>.</p>
+
+<ul>
+
+<li>To retrieve places within a specified distance around the center coordinates, use an instance of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1Geocoordinates.html">Tizen.Maps.Geocoordinates</a> object for the <code>CreatePlaceSearchRequest()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapService.html">Tizen.Maps.MapService</a> object:
+<pre class="prettyprint">
+try
+{
+    var request = maps.CreatePlaceSearchRequest(new Geocoordinates(48.85784, 2.29516), 50);
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", string.Format("Name=\"{0}\", Distance={1}m, Position={2}",
+                                             result.Name, result.Distance, result.Coordinates));
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+
+<li>To retrieve places within a specified geographic boundary, use an instance of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1Area.html">Tizen.Maps.Area</a> object for the <code>CreatePlaceSearchRequest()</code> method of the <code>Tizen.Maps.MapService</code> object:
+<pre class="prettyprint">
+try
+{
+    var request = maps.CreatePlaceSearchRequest(new Area(new Geocoordinates(12.980260, 77.697405), 500));
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", string.Format("Name=\"{0}\", Distance={1}m, Position={2}",
+                                             result.Name, result.Distance, result.Coordinates));
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+
+<li>To retrieve places based on an address within a specified geographic boundary, use a string of free-formed address and an instance of the <code>Area</code> object for the <code>CreatePlaceSearchRequest()</code> method of the <code>Tizen.Maps.MapService</code> object:
+<pre class="prettyprint">
+try
+{
+    var request = maps.CreatePlaceSearchRequest("The Taj Mahal Palace", new Area(new Geocoordinates(18.921729, 72.833031), 50));
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", string.Format("Name=\"{0}\", Distance={1}m, Position={2}",
+                                             result.Name, result.Distance, result.Coordinates));
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+</ul>
+
+<h2 id="use_search_route" name="use_search_route">Using the Routing Service</h2>
+
+<p>To query a route from point A to point B, use one of the following approaches. The service requests can be <a href="#preference">customized</a>.</p>
+
+<ul>
+<li>To query a route from one set of geographic coordinates to another:
+<pre class="prettyprint">
+try
+{
+    var request = maps.CreateRouteSearchRequest(new Geocoordinates(12.975491, 77.697182),
+                                                new Geocoordinates(12.990647, 77.687907));
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", $"From={result.Origin}");
+        foreach (var path in result.Path)
+        {
+            Log.Info("Tizen.Maps", $"Path={path.ToString()}");
+        }
+        Log.Info("Tizen.Maps", $"To  ={result.Destination}");
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+
+
+<li>To query a route passing through a specified set of waypoints:
+<pre class="prettyprint">
+try
+{
+    var request = maps.CreateRouteSearchRequest(new Geocoordinates(12.975491, 77.697182),
+                                                new Geocoordinates(12.990647, 77.687907));
+    request.Waypoints = new List&lt;Geocoordinates>()
+    {
+        new Geocoordinates(12.985043, 77.691285)
+    };
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", $"From={result.Origin}");
+        foreach (var path in result.Path)
+        {
+            Log.Info("Tizen.Maps", $"Path={path.ToString()}");
+        }
+        Log.Info("Tizen.Maps", $"To  ={result.Destination}");
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+</ul>
+
+
+
+<h2 id="preference" name="preference">Customizing the Service Requests</h2>
+
+<p>All map service requests can be customized with additional preferences. Preparing and sending the <code>preference</code> parameter with the service request allows the map provider to generate more accurate results.</p>
+<p>To customize the service request:</p>
+<ul>
+<li>
+<p>The example from <a href="#use_search_place">Using the Place Search Service</a> can be modified as follows to include the customized preferences:</p>
+<pre class="prettyprint">
+try
+{
+    maps.Preferences = new SearchPreference
+    {
+        MaxResults = 10, Unit = DistanceUnit.Yard
+    };
+    var request = maps.CreatePlaceSearchRequest("store", new Area(new Geocoordinates(37.5758418, 126.982763), 50));
+    var response = await request.GetResponseAsync();
+    foreach (var result in response)
+    {
+        Log.Info("Tizen.Maps", string.Format("Name=\"{0}\", Distance={1} yard(s), Position={2}",
+                                             result.Name, result.Distance, result.Coordinates));
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+
+<li>To prepare preferences for the routing service, use the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1SearchPreference.html">Tizen.Maps.SearchPreference</a> or <a href="https://developer.tizen.org/dev-guide/csapi/interfaceTizen_1_1Maps_1_1IRouteSearchPreference.html">Tizen.Maps.IRouteSearchPreference</a> methods.
+
+<p>The example from <a href="#use_search_route">Using the Routing Service</a> can be modified as follows to include the customized preferences:</p>
+<pre class="prettyprint">
+try
+{
+    maps.Preferences = new SearchPreference
+    {
+        Mode = TransportMode.Car
+    };
+    var request = maps.CreateRouteSearchRequest(new Geocoordinates(12.975491, 77.697182),
+                                                new Geocoordinates(12.990647, 77.677907));
+    var response = await request.GetResponseAsync();
+    var route = response.First();
+    foreach (var segment in route.Segments)
+    {
+        foreach (var maneuver in segment.Maneuvers)
+        {
+            Log.Info("Tizen.Maps", string.Format("Position={0}, Instruction={1} ",
+                                                 maneuver.Position, maneuver.Instruction));
+        }
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+</ul>
+<p>If your map provider requires any specific preferences, use the <code>Tizen.Maps.SearchPreference</code> class with key-value pairs defined in the appropriate map provider documentation.</p>
+
+
+<h2 id="maps_view" name="maps_view">Using the Map View</h2>
+
+<p>To use the map view:</p>
+<ol>
+<li>Before you use the view features, create a <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html">Tizen.Maps.MapView</a> instance:
+<pre class="prettyprint">
+try
+{
+    bool isconsented = await MapService.RequestUserConsent("MAP_PROVIDER_NAME");
+    if (isconsented)
+    {
+        maps = new MapService("MAP_PROVIDER_NAME", "Your-Map-Provider-Key");
+        window = new Window("Test");
+        mapview = new MapView(window, maps);
+
+        mapview.Resize(w, h - 100);
+        mapview.Move(0, 100);
+        mapview.Show();
+    }
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre>
+</li>
+
+<li>Set the map view properties:
+<ul><li>Set the map view type with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#ac64e446183cc9599847917a3fa9ec171">Tizen.Maps.MapView.MapType</a> property.
+<p>For other available types, see the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Maps.html#a25deaece99e3261cbb106ca0fa7de803">Tizen.Maps.MapTypes</a> enumerator.</p>
+<pre class="prettyprint">
+mapview.MapType = MapTypes.Satellite;
+</pre>
+</li>
+
+<li>Set the 3D building of the map view with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#a3b0de22abd144991d84006098ea78236">Tizen.Maps.MapView.BuildingsEnabled</a> property:
+<pre class="prettyprint">
+mapview.BuildingsEnabled = true;
+</pre>
+</li>
+
+<li>Set the public transit information of the map view with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#a0ba75e1b83ea04a1f2389a039b8d6a8b">Tizen.Maps.MapView.PublicTransitEnabled</a> property:
+<pre class="prettyprint">
+mapview.PublicTransitEnabled = true;
+</pre>
+</li>
+
+<li>Set the map view traffic information with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#af6f42abadd6851d01f1df922300dc157">Tizen.Maps.MapView.TrafficEnabled</a> property:
+<pre class="prettyprint">
+mapview.TrafficEnabled = true;
+</pre>
+</li>
+
+<li>Set the map view scalebar with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#aaed708132611cc59b24e3660169e1754">Tizen.Maps.MapView.ScalebarEnabled</a> property:
+<pre class="prettyprint">
+mapview.ScalebarEnabled = true;
+</pre>
+</li>
+
+<li>Set the map view language with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#a54ca8880f80511c9cf0cc8779d9ee760">Tizen.Maps.MapView.Language</a> property:
+<pre class="prettyprint">
+mapview.Language = "en-US";
+</pre>
+</li></ul>
+
+<div class="note">
+    <strong>Note</strong>
+    To check whether a feature is supported, use <code>IsSupported()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapService.html">Tizen.Maps.MapService</a> class with the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Maps.html#ab2d73e5080312b1e9e59f6ddadc64db7">Tizen.Maps.ServiceData</a> enumerator.
+</div>
+</li>
+
+<li>Set the map view location and size:
+<p>Set the map view location with the <code>Resize()</code> method of the <code>Tizen.Maps.MapView</code> class, inherited from the <code>EvasObject</code> class:</p>
+<pre class="prettyprint">
+mapview.Resize(400, 800);
+</pre>
+
+<p>You can also set the location with the <code>Move()</code> method of the <code>Tizen.Maps.MapView</code> class, inherited from the <code>EvasObject</code> class:</p>
+<pre class="prettyprint">
+mapview.Move(0, 0);
+</pre>
+
+<p>Set the map view visibility with the <code>Show()</code> method of the <code>Tizen.Maps.MapView</code> class, inherited from the <code>EvasObject</code> class:</p>
+<pre class="prettyprint">
+mapview.Show();
+</pre>
+</li>
+
+
+<li>Set the map view center with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#a2629a676da4efad748f27edc9810f0c0">Tizen.Maps.MapView.Center</a> property:
+<pre class="prettyprint">
+mapview.Center = new Geocoordinates(37.5758418, 126.982763);
+</pre>
+</li>
+
+<li>Set the map view orientation with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#a96ffa3da8c8e5ae3549c84c7d631c4c9">Tizen.Maps.MapView.Orientation</a> property:
+<pre class="prettyprint">
+mapview.Orientation = 45.0;
+</pre>
+</li>
+
+<li>Set the map view zoom level with the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#a9fe093ebfeda6c2a7fbceef27b99f4de">Tizen.Maps.MapView.ZoomLevel</a>, <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#ab95b12b417679d6cb91d8ee0ea1461eb">Tizen.Maps.MapView.MinimumZoomLevel</a>, and <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html#a921f21d6658726db96d95e76be11794d">Tizen.Maps.MapView.MaximumZoomLevel</a> properties:
+<pre class="prettyprint">
+mapview.ZoomLevel = 12;
+</pre>
+</li>
+
+</ol>
+
+
+<h2 id="maps_object" name="maps_object">Creating Map View Objects</h2>
+
+<p>You can create polyline, polygon, and marker objects for the map view.</p>
+
+<p>To create a map view object:</p>
+
+<ul><li>To create a polyline:
+<pre class="prettyprint">
+try
+{
+    var coordinatesList = new List&lt;Geocoordinates>
+    {
+        new Geocoordinates(37.15, 126.88), new Geocoordinates(37, 127.12),
+        new Geocoordinates(36.523, 127.20)
+    };
+    var color = new ElmSharp.Color(255, 1, 1);
+    var thick = 5;
+    Polyline polyline = new Polyline(coordinatesList, color, thick);
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre></li>
+
+<li>To create a polygon:
+<pre class="prettyprint">
+try
+{
+    var coordinatesList = new List&lt;Geocoordinates>
+    {
+        new Geocoordinates(37.15, 126.88), new Geocoordinates(37, 127.12),
+        new Geocoordinates(36.85, 126.99), new Geocoordinates(37, 126.79)
+    };
+    var color = new ElmSharp.Color(50, 200, 50, 128);
+    Polygon polygon = new Polygon(coordinatesList, color);
+}
+catch (Exception e)
+{
+    /// Error handling
+}
+</pre></li>
+
+<li>To create a marker:
+<pre class="prettyprint">
+Pin pin = new Pin(new Geocoordinates(28.64362, 77.19865));
+Sticker sticker = new Sticker(new Geocoordinates(28.64362, 77.19865));
+</pre>
+
+<p>To create a marker using a customized image:</p>
+<pre class="prettyprint">
+Pin pin = new Pin(new Geocoordinates(28.64362, 77.19865), "image/marker_pin.png");
+Sticker sticker = new Sticker(new Geocoordinates(28.64362, 77.19865), "image/marker_sticker.png");
+</pre>
+</li>
+</ul>
+
+
+
+<p>To add a map view object to a map view widget:</p>
+<ol>
+<li>Add the object instance to the map view with the <code>Add()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Maps_1_1MapView.html">Tizen.Maps.MapView</a> class:
+<pre class="prettyprint">
+mapview.Add(pin);
+</pre></li>
+
+<li>When no longer needed, remove the instance with the <code>Remove()</code> method of the <code>Tizen.Maps.MapView</code> class:
+<pre class="prettyprint">
+mapview.Remove(pin);
+</pre></li>
+</ol>
+
+
+
+<h2 id="maps_event" name="maps_event">Managing Map View Events</h2>
+
+<p>To handle map view events:</p>
+<ol><li>Register an event handler, which is triggered when map view events occur:
+<pre class="prettyprint">
+EventHandler&lt;MapGestureEventArgs> handler = (s, e) =>
+{
+    Log.Info("Tizen.Maps", $"DoubleClicked={e.Position} {e.Geocoordinates}");
+};
+mapview.DoubleClicked += handler; /// Double-click gesture is enabled
+</pre>
+
+<p>After the gesture handler is added, the gesture is enabled. Exceptionally, the click gesture is always enabled.</p></li>
+
+<li>When no longer needed, unset the event handler:
+<pre class="prettyprint">
+/// Double-click gesture is disabled, if there is no handler added
+mapview.DoubleClicked -= handler;
+</pre></li>
+</ol>
+
+
+<p>To handle map object events:</p>
+<ol><li>Register an event handler, which is triggered when map object events occur:
+
+<pre class="prettyprint">
+Pin pin = new Pin(new Geocoordinates(37, 127), s_imagePath);
+EventHandler handler = (s, e) => {
+    Pin myPin = (Pin)s;
+    Log.Info("Tizen.Maps", $"Position={myPin.Coordinates.ToString()}");
+};
+pin.Clicked += handler;
+</pre>
+</li>
+<li>When no longer needed, unset the event handler:
+<pre class="prettyprint">
+/// When the pin object no longer needs to accept click gestures
+pin.Clicked -= handler;
+</pre></li>
+</ol>
+
+
+<p>To handle map view ready events:</p>
+<ol><li>Register an event handler, which is triggered when map view ready events occur:
+
+<pre class="prettyprint">
+EventHandler handler = (s, e) =>
+{
+    Log.Info("Tizen.Maps", "Map view is ready.");
+};
+mapview.ViewReady += handler;
+</pre>
+</li>
+<li>When no longer needed, unset the event handler:
+<pre class="prettyprint">
+/// Map view ready event is disabled
+mapview.ViewReady -= handler;
+</pre></li>
+</ol>
+
+<script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../../scripts/showhide.js"></script>
+
+</div>
+</div>
+</div>
+
+
+<a class="top sms" href="#"><img src="../../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer"><p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">    Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+       var _gaq = _gaq || [];
+       _gaq.push(['_setAccount', 'UA-25976949-1']);
+       _gaq.push(['_trackPageview']);
+       (function() {
+                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+                })();
+</script>
+</body>
+</html>
+
+
+
+