Get the App
SLTechnology News&Howtos  ›  Development  › 

How to return nearby information according to the user's reply keyword\ location developed by PHP Wechat

Shulou Source: shulou.com Published: 2022-06-03 20:10:37 10月05日 Update

This article is about how PHP Wechat developers return nearby information based on user response keywords\ location. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

After users follow the Wechat official account, they can reply to the user's geographic location (Tencent Map) to the official account, extract the latitude and longitude of the location information, and convert it into the latitude and longitude of Baidu. Then, according to latitude and longitude, call the API of Baidu map to return information such as "hotel" and "hotel" (which can be customized) within the nearby radius 2KM. When you call Baidu's API, you need to get the apiKEY. If not, please register and apply at Baidu developer Center.

First, test the data returned by the interface with a set of latitudes and longitudes:

Tags: Information location user map longitude and latitude longitude and latitude key latitude longitude hotel keywords data reference development geography location links Tencent public content Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Docker macOS MariaDB OPPO Reno