PhoneGap geolocation get geolocation API

Source: Internet
Author: User

First, PhoneGap geolocation object Introduction

1. Enable applications to access geo-location information. The Geolocation object provides access to the device's GPS sensor. Geolocation provides location information for the device, such as longitude and latitude.

2. Common sources of location information include the Global Positioning System (GPS), as well as inferences made through network signals such as IP addresses, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA phone IDs.

3. There is no guarantee that the API will return the actual location information of the device. This API is implemented based on the Geo Location API specification.

4, some devices have provided the implementation of the specification, for these devices using built-in implementation instead of using PHONEGAP implementation.

5. PHONEGAP provides unified support for devices that do not have geo-location support.

6. Methods

Geolocation.getcurrentposition

Geolocation.watchposition

Geolocation.clearwatch

7. Parameters

Geolocationsuccess

Geolocationerror

Geolocationoptions

Second, geolocation.getcurrentposition

Returns the current position of the device, a location object.

PhoneGap geolocation get geolocation API

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.