cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject svn commit: r1735746 [13/23] - in /cordova/site/public/docs/en/6.x/reference: ./ cordova-cli/ cordova-plugin-battery-status/ cordova-plugin-camera/ cordova-plugin-console/ cordova-plugin-contacts/ cordova-plugin-device-motion/ cordova-plugin-device-ori...
Date Sat, 19 Mar 2016 09:25:08 GMT
Added: cordova/site/public/docs/en/6.x/reference/cordova-plugin-geolocation/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/6.x/reference/cordova-plugin-geolocation/index.html?rev=1735746&view=auto
==============================================================================
--- cordova/site/public/docs/en/6.x/reference/cordova-plugin-geolocation/index.html (added)
+++ cordova/site/public/docs/en/6.x/reference/cordova-plugin-geolocation/index.html Sat Mar 19 09:25:08 2016
@@ -0,0 +1,3203 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <meta name="format-detection" content="telephone=no">
+    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
+    <meta name="description" content=" ">
+
+    <title>
+        
+            
+                cordova-plugin-geolocation - Apache Cordova
+            
+        
+    </title>
+
+    <link rel="SHORTCUT ICON" href="/favicon.ico"/>
+    <link rel="canonical" href="https://cordova.apache.org/docs/en/6.x/reference/cordova-plugin-geolocation/">
+
+    <!-- CSS -->
+    <link rel="stylesheet" type="text/css" href="/static/css/main.css">
+    <link rel="stylesheet" type="text/css" href="/static/css/lib/syntax.css">
+
+
+    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+    <!--[if lt IE 9]>
+        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+    <![endif]-->
+    <script type="text/javascript">
+        var disqus_developer = 1; // this would set it to developer mode
+    </script>
+
+    <!-- JS -->
+    <script defer type="text/javascript" src="/static/js/lib/jquery-2.1.1.min.js"></script>
+    <script defer type="text/javascript" src="/static/js/lib/bootstrap.min.js"></script>
+    <script defer type="text/javascript" src="/static/js/lib/ZeroClipboard.js"></script>
+</head>
+
+<body>
+    <header>
+    <a class="scroll-point pt-top" name="top"></a>
+    <nav class="navbar navbar-inverse navbar-fixed-top">
+        <div class="container-fluid">
+            <div class="navbar-header">
+                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
+                    <span class="sr-only">Toggle navigation</span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                </button>
+                <a class="navbar-brand" href="/"><img id="logo_top" src="/static/img/cordova-logo-newbrand.svg"/></a>
+            </div>
+            <div id="navbar" class="navbar-collapse collapse">
+                <div class="nav_bar_center">
+                    <ul class="nav navbar-nav">
+                        <li class="active">
+                            <a href="/docs/en/latest/guide/overview/">Documentation</a>
+                        </li>
+                        <li >
+                            <a href="/plugins">Plugins</a>
+                        </li>
+                        <li >
+                            <a href="/blog" id="blog_button">Blog<span class="badge" id="new_blog_count"></span></a>
+                        </li>
+                        <li >
+                            <a href="/contribute">Contribute</a>
+                        </li>
+                        <li>
+                            <a href="/#getstarted">Get Started</a>
+                        </li>
+                    </ul>
+                    <form action="https://www.google.com/search" method="GET" class="navbar-form navbar-right" id="header-search-form" role="search">
+                        <div class="input-group">
+                            <input type="text" name="q" class="form-control hidden-sm" placeholder="Site-wide Search">
+                            <span class="input-group-btn">
+                                <button type="submit" class="btn search-button">
+                                    <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
+                                </button>
+                            </span>
+                        </div>
+                        <input type="hidden" name="q" value="site:cordova.apache.org">
+                    </form>
+                </div>
+            </div><!--/.navbar-collapse -->
+        </div>
+    </nav>
+    <div id="_fixed_navbar_spacer" style="padding-top:50px"></div>
+</header>
+
+    <!-- Use the manual ToC, and if it doesn't exist, use the generated one -->
+
+
+    
+
+
+
+
+
+
+
+
+
+<div class="docs container">
+
+    <!-- Table of Contents -->
+    <div class="hidden-xs hidden-sm col-md-3 site-toc-container">
+        <h2 class="site-toc-title">Table of Contents</h2>
+        <ul class="site-toc">
+    
+
+    
+    
+        
+    
+
+    <li>
+        
+        <span class="toc-section-heading">
+            Introduction
+        </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/overview/index.html">
+            Overview
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    
+    
+        
+    
+
+    <li>
+        
+        <span class="toc-section-heading">
+            Create apps
+        </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/cli/index.html">
+            Create your first app
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/support/index.html">
+            Platform support
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+        
+    
+
+    <li>
+        
+        <span class="toc-section-heading">
+            Develop for platforms
+        </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/android/index.html">
+            Android
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/blackberry10/home.html">
+            Blackberry 10
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/ios/index.html">
+            iOS
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/osx/index.html">
+            OS X
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/ubuntu/index.html">
+            Ubuntu
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/win8/index.html">
+            Windows
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/wp8/home.html">
+            WP8
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../platform_plugin_versioning_ref/index.html">
+            Manage versions and platforms
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+        
+            
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../config_ref/images.html">
+            Customize icons
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+        
+            
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../cordova/storage/storage.html">
+            Store data
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/appdev/privacy/index.html">
+            Manage privacy
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/appdev/security/index.html">
+            Manage security
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/appdev/whitelist/index.html">
+            Whitelisting
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+        
+            
+</ul>
+
+        
+    </li>
+    
+
+    
+    
+        
+    
+
+    <li>
+        
+        <span class="toc-section-heading">
+            Create plugins
+        </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/hybrid/plugins/index.html">
+            Create a plugin
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+        
+            
+
+    
+    
+        
+    
+
+    <li>
+        
+        <span class="toc-section-heading">
+            Develop for platforms
+        </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/android/plugin.html">
+            Android
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/blackberry10/plugin.html">
+            Blackberry 10
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/ios/plugin.html">
+            iOS
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/win8/plugin.html">
+            Windows
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/platforms/wp8/plugin.html">
+            WP8
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../plugin_ref/plugman.html">
+            Use Plugman
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+        
+            
+</ul>
+
+        
+    </li>
+    
+
+    
+    
+        
+    
+
+    <li>
+        
+        <span class="toc-section-heading">
+            Advanced Topics
+        </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/hybrid/webviews/index.html">
+            Embed Cordova in native apps
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+        
+            
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/next/index.html">
+            Next Steps
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    
+    
+        
+    
+
+    <li>
+        
+        <span class="toc-section-heading">
+            Reference
+        </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../config_ref/index.html">
+            Config.xml
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../cordova/events/events.html">
+            Events
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-cli/index.html">
+            CLI
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../guide/appdev/hooks/index.html">
+            Hooks
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../plugin_ref/spec.html">
+            Plugin.xml
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+        
+    
+
+    <li>
+        
+        <span class="toc-section-heading">
+            Plugin APIs
+        </span>
+        
+
+        
+        
+
+        
+        <ul class="site-toc">
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
+            Battery Status
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-camera/index.html">
+            Camera
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-console/index.html">
+            Console
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-contacts/index.html">
+            Contacts
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-device/index.html">
+            Device
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
+            Device Motion
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
+            Device Orientation
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
+            Dialogs
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-file/index.html">
+            File
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
+            File Transfer
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="this-page" href="../../reference/cordova-plugin-geolocation/index.html">
+            Geolocation
+        </a>
+        
+
+        
+        <div id="page-toc" class="page-toc"></div>
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-globalization/index.html">
+            Globalization
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
+            Inappbrowser
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-media/index.html">
+            Media
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-media-capture/index.html">
+            Media Capture
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-network-information/index.html">
+            Network Information
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-splashscreen/index.html">
+            Splashscreen
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-vibration/index.html">
+            Vibration
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-statusbar/index.html">
+            Statusbar
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-whitelist/index.html">
+            Whitelist
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+
+    
+    
+
+    <li>
+        
+        <a class="" href="../../reference/cordova-plugin-legacy-whitelist/index.html">
+            Legacy Whitelist
+        </a>
+        
+
+        
+        
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+</ul>
+
+        
+    </li>
+    
+
+    
+    
+        
+            
+</ul>
+
+    </div>
+
+    <!-- Page content -->
+    <div class="col-md-8 col-md-offset-1">
+        <div class=" content-header">
+
+            <!-- ToC Dropdown (for XS and SM sizes only) -->
+            <div class="toc-dropdown dropdown visible-xs-block visible-sm-block">
+                <button class="btn btn-default dropdown-toggle" type="button" id="tocDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
+                    Table of Contents
+                    <span class="caret"></span>
+                </button>
+                <ul class="dropdown-menu">
+                    
+
+
+
+
+<li>
+    <a class="" href="../../guide/overview/index.html">
+        Overview
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../guide/cli/index.html">
+        Create your first app
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/support/index.html">
+        Platform support
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/android/index.html">
+        Android
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/blackberry10/home.html">
+        Blackberry 10
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/ios/index.html">
+        iOS
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/osx/index.html">
+        OS X
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/ubuntu/index.html">
+        Ubuntu
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/win8/index.html">
+        Windows
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/wp8/home.html">
+        WP8
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../platform_plugin_versioning_ref/index.html">
+        Manage versions and platforms
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../config_ref/images.html">
+        Customize icons
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../cordova/storage/storage.html">
+        Store data
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/appdev/privacy/index.html">
+        Manage privacy
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/appdev/security/index.html">
+        Manage security
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/appdev/whitelist/index.html">
+        Whitelisting
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../guide/hybrid/plugins/index.html">
+        Create a plugin
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/android/plugin.html">
+        Android
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/blackberry10/plugin.html">
+        Blackberry 10
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/ios/plugin.html">
+        iOS
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/win8/plugin.html">
+        Windows
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/platforms/wp8/plugin.html">
+        WP8
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../plugin_ref/plugman.html">
+        Use Plugman
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../guide/hybrid/webviews/index.html">
+        Embed Cordova in native apps
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../guide/next/index.html">
+        Next Steps
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../config_ref/index.html">
+        Config.xml
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../cordova/events/events.html">
+        Events
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-cli/index.html">
+        CLI
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../guide/appdev/hooks/index.html">
+        Hooks
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../plugin_ref/spec.html">
+        Plugin.xml
+    </a>
+</li>
+
+
+
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
+        Battery Status
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-camera/index.html">
+        Camera
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-console/index.html">
+        Console
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-contacts/index.html">
+        Contacts
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-device/index.html">
+        Device
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
+        Device Motion
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
+        Device Orientation
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
+        Dialogs
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-file/index.html">
+        File
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
+        File Transfer
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="this-page" href="../../reference/cordova-plugin-geolocation/index.html">
+        Geolocation
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-globalization/index.html">
+        Globalization
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
+        Inappbrowser
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-media/index.html">
+        Media
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-media-capture/index.html">
+        Media Capture
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-network-information/index.html">
+        Network Information
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-splashscreen/index.html">
+        Splashscreen
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-vibration/index.html">
+        Vibration
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-statusbar/index.html">
+        Statusbar
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-whitelist/index.html">
+        Whitelist
+    </a>
+</li>
+
+
+
+
+<li>
+    <a class="" href="../../reference/cordova-plugin-legacy-whitelist/index.html">
+        Legacy Whitelist
+    </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+                </ul>
+            </div>
+
+            
+            
+                <a class="edit" href="https://github.com/apache/cordova-plugin-geolocation/blob/master/README.md"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a>
+
+            
+            
+
+            <!-- Language dropdown -->
+            <div class="dropdown">
+                <button class="btn btn-default dropdown-toggle" type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
+                    English
+                    <span class="caret"></span>
+                </button>
+
+                <!-- List all languages -->
+                <ul class="dropdown-menu" aria-labelledby="languageDropdown">
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/de/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                Deutsch
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/en/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                <span class="selected">
+                                    English
+                                </span>
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/es/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                Español
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/fr/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                Français
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/it/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                Italiano
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/ja/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                日本語
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/ko/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                한국어
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/pl/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                Polski
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/ru/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                Русский
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/sl/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                Slovene
+                            
+                        </a>
+                    </li>
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+                    
+
+                    
+
+                    <li>
+                        <a href="/docs/zh/6.x/reference/cordova-plugin-geolocation/index.html" class="
+                        
+                        
+                    "
+                        >
+                            
+                                汉语
+                            
+                        </a>
+                    </li>
+                    
+                </ul>
+            </div>
+
+            <!-- Version dropdown -->
+            <div class="dropdown">
+                <button class="btn btn-default dropdown-toggle" type="button" id="versionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
+                    6.x
+                    
+                        (Latest)
+                    
+                    <span class="caret"></span>
+                </button>
+                <ul class="dropdown-menu" aria-labelledby="versionDropdown">
+
+                    <!-- List versions available in this language -->
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/dev/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            dev
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/latest/reference/cordova-plugin-geolocation/index.html">
+                            
+                                <span class="selected">
+                                    
+                            6.x
+                            
+                                (Latest)
+                            
+                        
+                                </span>
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/5.4.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            5.4.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/5.1.1/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            5.1.1
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/5.0.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            5.0.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/4.0.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            4.0.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/3.6.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            3.6.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/3.5.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            3.5.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/3.4.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            3.4.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/3.3.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            3.3.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/3.2.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            3.2.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/3.1.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            3.1.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/3.0.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            3.0.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.9.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.9.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.8.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.8.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.7.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.7.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.6.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.6.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.5.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.5.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.4.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.4.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.3.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.3.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.2.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.2.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.1.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.1.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/2.0.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            2.0.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/1.9.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            1.9.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/1.8.1/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            1.8.1
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/1.8.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            1.8.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/1.7.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            1.7.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/1.6.1/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            1.6.1
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/1.6.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            1.6.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                    <li>
+                        
+                        
+                            
+                        
+
+                        
+                        
+
+                        
+
+                        
+                        
+
+                        <a href="/docs/en/1.5.0/reference/cordova-plugin-geolocation/index.html">
+                            
+                                
+                            1.5.0
+                            
+                        
+                            
+                        </a>
+                    </li>
+                    
+                </ul>
+            </div>
+        </div>
+
+        <!-- Get URL for this page in the latest version -->
+        
+        
+        
+
+        <!-- Show warnings for special versions (i.e. non-latest, and dev) -->
+        
+
+        
+            <div class="alert alert-warning docs-alert" role="alert">
+                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+                    <span aria-hidden="true">&times;</span>
+                </button>
+                This documentation describes this plugin at version master.
+                <a href="https://github.com/apache/cordova-plugin-geolocation/releases">
+                    Other versions are on GitHub.
+                </a>
+            </div>
+
+        
+
+        <div id="page-toc-source">
+            <!-- WARNING: This file is generated. See fetch_docs.js. -->
+
+<!--
+# license: Licensed to the Apache Software Foundation (ASF) under one
+#         or more contributor license agreements.  See the NOTICE file
+#         distributed with this work for additional information
+#         regarding copyright ownership.  The ASF licenses this file
+#         to you under the Apache License, Version 2.0 (the
+#         "License"); you may not use this file except in compliance
+#         with the License.  You may obtain a copy of the License at
+#
+#           http://www.apache.org/licenses/LICENSE-2.0
+#
+#         Unless required by applicable law or agreed to in writing,
+#         software distributed under the License is distributed on an
+#         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#         KIND, either express or implied.  See the License for the
+#         specific language governing permissions and limitations
+#         under the License.
+-->
+
+<p><a href="https://travis-ci.org/apache/cordova-plugin-geolocation"><img src="https://travis-ci.org/apache/cordova-plugin-geolocation.svg?branch=master" alt="Build Status"></a></p>
+
+<h1>cordova-plugin-geolocation</h1>
+
+<p>This plugin provides information about the device&#39;s location, such as
+latitude and longitude. Common sources of location information include
+Global Positioning System (GPS) and location inferred from network
+signals such as IP address, RFID, WiFi and Bluetooth MAC addresses,
+and GSM/CDMA cell IDs. There is no guarantee that the API returns the
+device&#39;s actual location.</p>
+
+<p>This API is based on the
+<a href="http://dev.w3.org/geo/api/spec-source.html">W3C Geolocation API Specification</a>,
+and only executes on devices that don&#39;t already provide an implementation.</p>
+
+<p><strong>WARNING</strong>: Collection and use of geolocation data
+raises important privacy issues.  Your app&#39;s privacy policy should
+discuss how the app uses geolocation data, whether it is shared with
+any other parties, and the level of precision of the data (for
+example, coarse, fine, ZIP code level, etc.).  Geolocation data is
+generally considered sensitive because it can reveal user&#39;s
+whereabouts and, if stored, the history of their travels.
+Therefore, in addition to the app&#39;s privacy policy, you should
+strongly consider providing a just-in-time notice before the app
+accesses geolocation data (if the device operating system doesn&#39;t do
+so already).  That notice should provide the same information noted
+above, as well as obtaining the user&#39;s permission (e.g., by presenting
+choices for <strong>OK</strong> and <strong>No Thanks</strong>).  For more information, please
+see the <a href="http://cordova.apache.org/docs/en/latest/guide/appdev/privacy/index.html">Privacy Guide</a>.</p>
+
+<p>This plugin defines a global <code>navigator.geolocation</code> object (for platforms
+where it is otherwise missing).</p>
+
+<p>Although the object is in the global scope, features provided by this plugin
+are not available until after the <code>deviceready</code> event.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">document.addEventListener("deviceready", onDeviceReady, false);
+function onDeviceReady() {
+    console.log("navigator.geolocation works well");
+}
+</code></pre></div>
+<h2>Installation</h2>
+
+<p>This requires cordova 5.0+ ( current stable 1.0.0 )</p>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add cordova-plugin-geolocation
+</code></pre></div>
+<p>Older versions of cordova can still install via the deprecated id ( stale 0.3.12 )</p>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add org.apache.cordova.geolocation
+</code></pre></div>
+<p>It is also possible to install via repo url directly ( unstable )</p>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add https://github.com/apache/cordova-plugin-geolocation.git
+</code></pre></div>
+<h2>Supported Platforms</h2>
+
+<ul>
+<li>Amazon Fire OS</li>
+<li>Android</li>
+<li>BlackBerry 10</li>
+<li>Firefox OS</li>
+<li>iOS</li>
+<li>Tizen</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows</li>
+</ul>
+
+<h2>Methods</h2>
+
+<ul>
+<li>navigator.geolocation.getCurrentPosition</li>
+<li>navigator.geolocation.watchPosition</li>
+<li>navigator.geolocation.clearWatch</li>
+</ul>
+
+<h2>Objects (Read-Only)</h2>
+
+<ul>
+<li>Position</li>
+<li>PositionError</li>
+<li>Coordinates</li>
+</ul>
+
+<h2>navigator.geolocation.getCurrentPosition</h2>
+
+<p>Returns the device&#39;s current position to the <code>geolocationSuccess</code>
+callback with a <code>Position</code> object as the parameter.  If there is an
+error, the <code>geolocationError</code> callback is passed a
+<code>PositionError</code> object.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">navigator.geolocation.getCurrentPosition(geolocationSuccess,
+                                         [geolocationError],
+                                         [geolocationOptions]);
+</code></pre></div>
+<h3>Parameters</h3>
+
+<ul>
+<li><p><strong>geolocationSuccess</strong>: The callback that is passed the current position.</p></li>
+<li><p><strong>geolocationError</strong>: <em>(Optional)</em> The callback that executes if an error occurs.</p></li>
+<li><p><strong>geolocationOptions</strong>: <em>(Optional)</em> The geolocation options.</p></li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">// onSuccess Callback
+// This method accepts a Position object, which contains the
+// current GPS coordinates
+//
+var onSuccess = function(position) {
+    alert('Latitude: '          + position.coords.latitude          + '\n' +
+          'Longitude: '         + position.coords.longitude         + '\n' +
+          'Altitude: '          + position.coords.altitude          + '\n' +
+          'Accuracy: '          + position.coords.accuracy          + '\n' +
+          'Altitude Accuracy: ' + position.coords.altitudeAccuracy  + '\n' +
+          'Heading: '           + position.coords.heading           + '\n' +
+          'Speed: '             + position.coords.speed             + '\n' +
+          'Timestamp: '         + position.timestamp                + '\n');
+};
+
+// onError Callback receives a PositionError object
+//
+function onError(error) {
+    alert('code: '    + error.code    + '\n' +
+          'message: ' + error.message + '\n');
+}
+
+navigator.geolocation.getCurrentPosition(onSuccess, onError);
+</code></pre></div>
+<h3>Android Quirks</h3>
+
+<p>If Geolocation service is turned off the <code>onError</code> callback is invoked after <code>timeout</code> interval (if specified).
+If <code>timeout</code> parameter is not specified then no callback is called.</p>
+
+<h2>navigator.geolocation.watchPosition</h2>
+
+<p>Returns the device&#39;s current position when a change in position is detected.
+When the device retrieves a new location, the <code>geolocationSuccess</code>
+callback executes with a <code>Position</code> object as the parameter.  If
+there is an error, the <code>geolocationError</code> callback executes with a
+<code>PositionError</code> object as the parameter.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">var watchId = navigator.geolocation.watchPosition(geolocationSuccess,
+                                                  [geolocationError],
+                                                  [geolocationOptions]);
+</code></pre></div>
+<h3>Parameters</h3>
+
+<ul>
+<li><p><strong>geolocationSuccess</strong>: The callback that is passed the current position.</p></li>
+<li><p><strong>geolocationError</strong>: (Optional) The callback that executes if an error occurs.</p></li>
+<li><p><strong>geolocationOptions</strong>: (Optional) The geolocation options.</p></li>
+</ul>
+
+<h3>Returns</h3>
+
+<ul>
+<li><strong>String</strong>: returns a watch id that references the watch position interval. The watch id should be used with <code>navigator.geolocation.clearWatch</code> to stop watching for changes in position.</li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">// onSuccess Callback
+//   This method accepts a `Position` object, which contains
+//   the current GPS coordinates
+//
+function onSuccess(position) {
+    var element = document.getElementById('geolocation');
+    element.innerHTML = 'Latitude: '  + position.coords.latitude      + '&lt;br /&gt;' +
+                        'Longitude: ' + position.coords.longitude     + '&lt;br /&gt;' +
+                        '&lt;hr /&gt;'      + element.innerHTML;
+}
+
+// onError Callback receives a PositionError object
+//
+function onError(error) {
+    alert('code: '    + error.code    + '\n' +
+          'message: ' + error.message + '\n');
+}
+
+// Options: throw an error if no update is received every 30 seconds.
+//
+var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { timeout: 30000 });
+</code></pre></div>
+<h2>geolocationOptions</h2>
+
+<p>Optional parameters to customize the retrieval of the geolocation
+<code>Position</code>.</p>
+<div class="highlight"><pre><code class="language-" data-lang=""><span class="p">{</span><span class="w"> </span><span class="err">maximumAge:</span><span class="w"> </span><span class="err">3000,</span><span class="w"> </span><span class="err">timeout:</span><span class="w"> </span><span class="err">5000,</span><span class="w"> </span><span class="err">enableHighAccuracy:</span><span class="w"> </span><span class="err">true</span><span class="w"> </span><span class="p">}</span><span class="err">;</span><span class="w">
+</span></code></pre></div>
+<h3>Options</h3>
+
+<ul>
+<li><p><strong>enableHighAccuracy</strong>: Provides a hint that the application needs the best possible results. By default, the device attempts to retrieve a <code>Position</code> using network-based methods. Setting this property to <code>true</code> tells the framework to use more accurate methods, such as satellite positioning. <em>(Boolean)</em></p></li>
+<li><p><strong>timeout</strong>: The maximum length of time (milliseconds) that is allowed to pass from the call to <code>navigator.geolocation.getCurrentPosition</code> or <code>geolocation.watchPosition</code> until the corresponding <code>geolocationSuccess</code> callback executes. If the <code>geolocationSuccess</code> callback is not invoked within this time, the <code>geolocationError</code> callback is passed a <code>PositionError.TIMEOUT</code> error code. (Note that when used in conjunction with <code>geolocation.watchPosition</code>, the <code>geolocationError</code> callback could be called on an interval every <code>timeout</code> milliseconds!) <em>(Number)</em></p></li>
+<li><p><strong>maximumAge</strong>: Accept a cached position whose age is no greater than the specified time in milliseconds. <em>(Number)</em></p></li>
+</ul>
+
+<h3>Android Quirks</h3>
+
+<p>If Geolocation service is turned off the <code>onError</code> callback is invoked after <code>timeout</code> interval (if specified).
+If <code>timeout</code> parameter is not specified then no callback is called.</p>
+
+<h2>navigator.geolocation.clearWatch</h2>
+
+<p>Stop watching for changes to the device&#39;s location referenced by the
+<code>watchID</code> parameter.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">navigator.geolocation.clearWatch(watchID);
+</code></pre></div>
+<h3>Parameters</h3>
+
+<ul>
+<li><strong>watchID</strong>: The id of the <code>watchPosition</code> interval to clear. (String)</li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">// Options: watch for changes in position, and use the most
+// accurate position acquisition method available.
+//
+var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { enableHighAccuracy: true });
+
+// ...later on...
+
+navigator.geolocation.clearWatch(watchID);
+</code></pre></div>
+<h2>Position</h2>
+
+<p>Contains <code>Position</code> coordinates and timestamp, created by the geolocation API.</p>
+
+<h3>Properties</h3>
+
+<ul>
+<li><p><strong>coords</strong>: A set of geographic coordinates. <em>(Coordinates)</em></p></li>
+<li><p><strong>timestamp</strong>: Creation timestamp for <code>coords</code>. <em>(DOMTimeStamp)</em></p></li>
+</ul>
+
+<h2>Coordinates</h2>
+
+<p>A <code>Coordinates</code> object is attached to a <code>Position</code> object that is
+available to callback functions in requests for the current position.
+It contains a set of properties that describe the geographic coordinates of a position.</p>
+
+<h3>Properties</h3>
+
+<ul>
+<li><p><strong>latitude</strong>: Latitude in decimal degrees. <em>(Number)</em></p></li>
+<li><p><strong>longitude</strong>: Longitude in decimal degrees. <em>(Number)</em></p></li>
+<li><p><strong>altitude</strong>: Height of the position in meters above the ellipsoid. <em>(Number)</em></p></li>
+<li><p><strong>accuracy</strong>: Accuracy level of the latitude and longitude coordinates in meters. <em>(Number)</em></p></li>
+<li><p><strong>altitudeAccuracy</strong>: Accuracy level of the altitude coordinate in meters. <em>(Number)</em></p></li>
+<li><p><strong>heading</strong>: Direction of travel, specified in degrees counting clockwise relative to the true north. <em>(Number)</em></p></li>
+<li><p><strong>speed</strong>: Current ground speed of the device, specified in meters per second. <em>(Number)</em></p></li>
+</ul>
+
+<h3>Amazon Fire OS Quirks</h3>
+
+<p><strong>altitudeAccuracy</strong>: Not supported by Android devices, returning <code>null</code>.</p>
+
+<h3>Android Quirks</h3>
+
+<p><strong>altitudeAccuracy</strong>: Not supported by Android devices, returning <code>null</code>.</p>
+
+<h2>PositionError</h2>
+
+<p>The <code>PositionError</code> object is passed to the <code>geolocationError</code>
+callback function when an error occurs with navigator.geolocation.</p>
+
+<h3>Properties</h3>
+
+<ul>
+<li><p><strong>code</strong>: One of the predefined error codes listed below.</p></li>
+<li><p><strong>message</strong>: Error message describing the details of the error encountered.</p></li>
+</ul>
+
+<h3>Constants</h3>
+
+<ul>
+<li><code>PositionError.PERMISSION_DENIED</code>
+
+<ul>
+<li>Returned when users do not allow the app to retrieve position information. This is dependent on the platform.</li>
+</ul></li>
+<li><code>PositionError.POSITION_UNAVAILABLE</code>
+
+<ul>
+<li>Returned when the device is unable to retrieve a position. In general, this means the device is not connected to a network or can&#39;t get a satellite fix.</li>
+</ul></li>
+<li><code>PositionError.TIMEOUT</code>
+
+<ul>
+<li>Returned when the device is unable to retrieve a position within the time specified by the <code>timeout</code> included in <code>geolocationOptions</code>. When used with <code>navigator.geolocation.watchPosition</code>, this error could be repeatedly passed to the <code>geolocationError</code> callback every <code>timeout</code> milliseconds.</li>
+</ul></li>
+</ul>
+
+
+        </div>
+    </div>
+</div>
+
+<script defer type="text/javascript" src="/static/js/lib/toc.min.js"></script>
+<script defer type="text/javascript" src="/static/js/docs.js"></script>
+
+    <div class="blue-divider"></div>
+<footer>
+    <div class="container" id="footer">
+        <div class="row">
+            <div class="col-sm-9">
+                <h1>More Resources</h1>
+                <div class="row">
+                    <div class="col-sm-4">
+                        <h2>General</h2>
+                        <ul class="nav">
+                            <li>
+                                <a target="_blank" href="https://projects.apache.org/project.html?cordova">Apache Project Page</a>
+                            </li>
+                            <li>
+                                <a href="https://dist.apache.org/repos/dist/release/cordova/">Source Distribution</a>
+                            </li>
+                            <li>
+                                <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">License</a>
+                            </li>
+                            <li>
+                                <a href="/artwork">Artwork</a>
+                            </li>
+                        </ul>
+                    </div>
+                    <div class="col-sm-4">
+                        <h2>Development</h2>
+                        <ul class="nav">
+                            <li><a target="_blank" href="https://github.com/apache?utf8=%E2%9C%93&amp;query=cordova-">Source Code</a></li>
+                            <li><a target="_blank" href="https://issues.apache.org/jira/browse/CB/">Issue Tracker</a></li>
+                            <li><a target="_blank" href="http://stackoverflow.com/questions/tagged/cordova">Stack Overflow</a></li>
+                            <li><a href="/contact">Mailing List</a></li>
+                        </ul>
+                    </div>
+                    <div class="col-sm-4">
+                        <h2>Apache Software Foundation</h2>
+                        <ul class="nav">
+                            <li>
+                                <a target="_blank" href="http://www.apache.org/">About ASF</a>
+                            </li>
+                            <li>
+                                <a target="_blank" href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a>
+                            </li>
+                            <li>
+                                <a target="_blank" href="http://www.apache.org/foundation/thanks.html">Thanks</a>
+                            </li>
+                            <li>
+                                <a target="_blank" href="http://www.apache.org/security/">Security</a>
+                            </li>
+                        </ul>
+                    </div>
+                </div>
+            </div>
+            <div class="col-sm-3">
+                <h1>Contribute</h1>
+                <p style="padding-top:20px"><strong>Help Cordova move forward!</strong></p>
+                <p>Report bugs, improve the docs, or contribute to the code.</p>
+                <a href="/contribute" class="btn btn-lg btn-primary">
+                    Learn More
+                </a>
+                <p style="padding-top:20px"> <a href="https://twitter.com/apachecordova" class="twitter-follow-button" data-show-count="false">Follow @apachecordova</a></p>
+                <script async defer src="https://slack.cordova.io/slackin.js"></script>
+            </div>
+        </div>
+        <p class="copyright_text">
+            Copyright &copy; 2012, 2013, 2015 The Apache Software Foundation, Licensed under the <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>
+            Apache and the Apache feather logos are <a target="_blank" href="http://www.apache.org/foundation/marks/list/">trademarks</a> of The Apache Software Foundation.
+        </p>
+        <a class="closing" href="#top"></a>
+    </div>
+</footer>
+
+<script defer type="text/javascript" src="/static/js/index.js"></script>
+<script defer type="text/javascript" src="/static/js/twitter.js"></script>
+
+    <script>
+    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+    ga('create', 'UA-64283057-3', 'auto');
+    ga('send', 'pageview');
+</script>
+
+</body>
+</html>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message