H5 obtains the longitude and latitude of a user

Source: Internet
Author: User
Use navigator of H5. the geolocation interface obtains the longitude and latitude of the user. However, a confirmation message indicating whether to agree is displayed every time the user enters the page, resulting in unfriendly user experience. Are there other ways to obtain the user's latitude and longitude? The requirement is to obtain the user's latitude and longitude to calculate the user... use H5 Navigator. geolocationThe interface obtains the longitude and latitude of the user, but each time you enter the page, a confirmation message indicating whether to agree is displayed, resulting in unfriendly user experience. Is there any other way to obtain the longitude and latitude of the user?

The requirement is to obtain the user's latitude and longitude to calculate the merchant nearby the user.

Reply content:

Using H5Navigator. geolocationThe interface obtains the longitude and latitude of the user, but each time you enter the page, a confirmation message indicating whether to agree is displayed, resulting in unfriendly user experience. Is there any other way to obtain the longitude and latitude of the user?

The requirement is to obtain the user's latitude and longitude to calculate the merchant nearby the user.

You should be talking about the mobile end, because the pc end can only ask once, if you want to be more accurate, it is still onlyNavigator. geolocationNow, you can only check the IP addresses. I don't know much about it.
In addition, if your webpage is open in, you can use the providedGpsInterface.

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.