Home  >  Article  >  Backend Development  >  javascript - WeChat positioning gets the city name displayed on the page

javascript - WeChat positioning gets the city name displayed on the page

WBOY
WBOYOriginal
2016-12-01 00:56:591433browse

In the WeChat service account or official account, how to write the front-end and back-end to obtain the user's city location and display it on the service account page? How to implement the code?

Reply content:

In the WeChat service account or official account, how to write the front-end and back-end to obtain the user's city location and display it on the service account page? How to implement the code?

This has a plug-in, search it on Baidu

Just use the map api

onload calls the WeChat built-in method wx.getLocation method to obtain the positioning information, and then performs subsequent operations

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn