Added documentation for getting mapzen map credentials and api keys 67/93767/3
authorVarun <tallytalwar@gmail.com>
Tue, 25 Oct 2016 21:03:15 +0000 (17:03 -0400)
committerVarun <tallytalwar@gmail.com>
Wed, 26 Oct 2016 14:35:54 +0000 (10:35 -0400)
PS2: [LB] Reviewed
PS3: [VT/Mike] Updated for the review comment

Change-Id: Ibc5be5dc6c1bba24127d7a3b781f53cff2b43335

org.tizen.guides/html/index.htm
org.tizen.guides/html/native/location_sensors/maps_n.htm
org.tizen.guides/html/native/location_sensors/mapzen_credentials_n.htm [new file with mode: 0644]
org.tizen.guides/index.xml

index 09c9bb5..0ee9d22 100644 (file)
                                <li><a href="native/location_sensors/maps_n.htm">Maps and Maps Service</a>
                                        <ul>
                                                <li><a href="native/location_sensors/here_credentials_n.htm">Getting HERE Maps Credentials</a></li>
+                                               <li><a href="native/location_sensors/mapzen_credentials_n.htm">Getting A Mapzen API Key</a></li>
                                        </ul>
                                </li>
                                <li><a href="native/location_sensors/device_sensors_n.htm">Device Sensors</a></li>
index 4ca40b7..33ac10f 100644 (file)
 
  <p>Before you start, remember to <a href="#prerequisites">prepare your application to use the maps service functionality</a>.</p>
 
-<p>The following map provider is supported:</p>
+<p>The following map providers are supported:</p>
        <ul>
-               <li><a href="https://developer.here.com">HERE Maps</a> based on the <a href="https://developer.here.com/rest-apis">HERE REST API</a>.
+               <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, you need to <a href="here_credentials_n.htm">get credentials</a>.</p></li>
+               <li><a href="https://mapzen.com" target="_blank">Mapzen Maps</a> based on Mapzen services.
+               <p>To use the Mapzen Maps, you need to <a href="mapzen_credentials_n.htm">get the Mapzen API keys</a>.</p></li>
        </ul>
 
 <table class="note"> 
diff --git a/org.tizen.guides/html/native/location_sensors/mapzen_credentials_n.htm b/org.tizen.guides/html/native/location_sensors/mapzen_credentials_n.htm
new file mode 100644 (file)
index 0000000..ed7bfa4
--- /dev/null
@@ -0,0 +1,163 @@
+<!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>Getting A Mapzen API Key</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile native" src="../../images/mobile_s_n.png"/></p>
+       </div>
+       <div id="toc_border">
+               <div id="toc">
+                       <p class="toc-title">Dependencies</p>
+                       <ul class="toc">
+                               <li>Tizen 3.0 and Higher for Mobile</li>
+                       </ul>                   
+                       <p class="toc-title">Content</p>
+                       <ul class="toc">
+                               <li><a href="#rate_limit">API Rate Limits</a></li> 
+                               <li><a href="#check">API Usage Check</a></li>
+                       </ul>
+                       <p class="toc-title">Related Info</p>
+                       <ul class="toc">
+                               <li><a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__MAPS__SERVICE__MODULE.html">Maps Service API for Mobile Native</a></li>
+                       </ul>
+               </div>
+       </div>
+</div>
+
+       <div id="container"><div id="contents"><div class="content">
+
+<h1>Getting A Mapzen API Key</h1>
+
+<p>Mapzen products help you put a map anywhere, search and route the planet, and try a world of open data. They are built from open-source tools that are packaged into a Web service and hosted on the Mapzen servers. If you want to use Mapzen services, you must create a Mapzen developer account and a valid API key, and keep your requests to the service within certain rate limits.</p>
+
+  <table class="note">
+   <tbody>
+    <tr>
+     <th class="note">Note</th>
+    </tr>
+    <tr>
+     <td class="note">Mapzen products are available for any use, including commercial purposes. You must follow the <a href="https://mapzen.com/rights/" target="_blank">attribution requirements</a> for the data source, and also provide acknowledgment to Mapzen if you are using these Web services.</td>
+    </tr>
+   </tbody>
+  </table>
+
+<p>Mapzen developer account authentication is made through <a href="https://github.com" target="_blank">GitHub</a>, which is a Web site that enables people to collaborate on a project. You need a GitHub account to create a Mapzen developer account, as there is currently no other form of authentication.</p>
+
+<p>To create the Mapzen API key:</p>
+
+<ol>
+<li>If you do not have a GitHub account, <a href="https://github.com/join" target="_blank">create it</a>.
+<p>You can create any kind of account, including personal.</p></li>
+<li>Go to <a href="https://mapzen.com/developers " target="_blank">https://mapzen.com/developers</a>.
+<p>This is where you can create, delete, and manage your API keys.</p></li>
+<li>Sign in with your GitHub account.
+<p>If you are signing in for the first time, you must agree to the terms.</p></li>
+<li>Create a new Mapzen key in the dashboard.
+<p>The API key is a code that uniquely identifies your developer account without providing a password.</p></li>
+<li>Optionally, give the key a name so you can remember the purpose of the project.</li>
+</ol>
+
+<p>To use the Mapzen API key in your application, set it with the <span style="font-family: Courier New,Courier,monospace">maps_service_set_provider_key()</span> function:</p>
+
+<pre class="prettyprint">
+maps_service_h maps = NULL;
+int error = maps_service_create(&quot;MAPZEN&quot;, &amp;maps);
+error = maps_service_set_provider_key(maps, &quot;mapzen-xxxxxx&quot;)
+</pre>
+
+<h2 id="rate_limit">API Rate Limits</h2>
+
+<p>Mapzen offers a free tier for each service, subject to the rate limits listed below. Mapzen-hosted services are shared resources, so there are limitations to prevent individual users from degrading system performance for everyone. The services have maximum numbers of queries you can make within a certain period of time, and some have additional limitations to minimize computationally intensive uses.</p>
+
+<p>All the projects used to build the Mapzen-hosted services are open source. If you want to try Mapzen products, start with the hosted services to see if they fit your work flow needs. If you later decide that you need additional customizations or higher capacity, consider installing the open-source code used to build Mapzen services on your own servers.</p>
+
+<p>If you find a problem, need higher limits, or have enhancement suggestions for Mapzen products, contact <a href="mailto:hello@mapzen.com" target="_top">hello@mapzen.com.</a>.</p>
+
+<p>The service limitations when using a Mapzen API key:</p>
+
+<ul>
+<li><a href="https://mapzen.com/documentation/vector-tiles/" target="_blank">Mapzen Vector Tiles</a> provides global basemap coverage with the following limits:
+
+<ul>
+<li>100 queries per second</li>
+<li>2,000 queries per minute</li>
+<li>100,000 queries per day</li>
+</ul>
+</li>
+
+<li><a href="https://mapzen.com/documentation/search/" target="_blank">Mapzen Search</a> is a geocoding and place-finding service with the following limits:
+
+<ul>
+<li>6 queries per second</li>
+<li>30,000 queries per day</li>
+</ul>
+</li>
+
+<li><a href="https://mapzen.com/documentation/turn-by-turn/" target="_blank">Mapzen Turn-by-Turn</a> is a routing and navigation service with the following limits:
+
+<ul>
+<li>2 queries per second</li>
+<li>50,000 queries per day</li>
+<li>Pedestrian routes have a limit of 50 locations and 250 kilometers.</li>
+<li>Bicycle routes have a limit of 50 locations and 500 kilometers.</li>
+<li>Automobile routes have a limit of 20 locations and 5,000 kilometers.</li>
+<li>Multimodal routes have a limit of 500 kilometers between locations.</li>
+</ul>
+
+<p>The distance limit is the total straight-line distance (colloquially, as the crow flies) along a path through successive locations.</p>
+</li>
+</ul>
+
+<h2 id="check">API Usage Check</h2>
+
+<p>To check your usage for a specific API key:</p>
+
+<ol>
+<li><a href="https://mapzen.com/developers" target="_blank">Sign in</a> to your developer account.</li>
+<li>Click the <strong>statistics</strong> button for the API key whose usage you want to review.</li>
+<li>View a graph of your recent usage for a certain period of time, such as the past day or month.</li>
+</ol>
+
+<p>If you exceed rate limits, you can notice it in the <a href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes" target="_blank">HTTP status codes</a> you receive in the header for the server&#39;s response to your queries. The typical errors for exceeded limits are &quot;403 Forbidden&quot; and &quot;429 Too Many Requests&quot;.</p>
+
+<p>All queries do not count towards your rate limit. Mapzen uses server caching to deliver commonly requested content as quickly as possible. Queries served from the cache are not included in the rate limit count. For example, queries can be served from the cache when you browse a map with vector tiles in a popular extent or repeatedly perform an identical geocoding search.</p>
+
+<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>
+
index 2ef68b7..d0f5457 100644 (file)
                <topic href="html/native/location_sensors/location_n.htm" label="Location Information"></topic>
                <topic href="html/native/location_sensors/maps_n.htm" label="Maps and Maps Service">
                        <topic href="html/native/location_sensors/here_credentials_n.htm" label="Getting HERE Maps Credentials"></topic>
+                       <topic href="html/native/location_sensors/mapzen_credentials_n.htm" label="Getting A Mapzen API Key"></topic>
                </topic>
                <topic href="html/native/location_sensors/device_sensors_n.htm" label="Device Sensors"></topic>
                <topic href="html/native/location_sensors/activity_n.htm" label="Activity Recognition"></topic>