Use H5
navigator.geolocation interface to get the latitude and longitude of the user, but every time you enter the page, will pop up a confirmation of the consent of the message, causing the user experience is very unfriendly, there are other ways to get the latitude and longitude of the user?
The requirement is to get the latitude and longitude of the user to calculate the merchant near the user.
Reply content:
Use H5 navigator.geolocation interface to get the latitude and longitude of the user, but every time you enter the page, will pop up a confirmation of the consent of the message, causing the user experience is very unfriendly, there are other ways to get the latitude and longitude of the user?
The requirement is to get the latitude and longitude of the user to calculate the merchant near the user.
You said should be mobile side, because the PC can only ask once, if you want to more accurate, or only navigator.geolocation , the other only IP address can be checked, I know is not particularly comprehensive.
Also, if your page is open in, you can use the provided gps interface, and you should also only ask once.