Borrow and return a map similar to ofo. What should I do in Wechat's official account?

clipboard.png

how to realize this kind of map positioning? find the train of thought in Wechat"s official account.

Mar.20,2021

in Wechat official account , does this description require users to open your official account chat window and directly show your application? It should not be done, oh, it can only be made in the form of H5 or Mini Program, and add an entrance to the button below the official account.

needless to say, server side and bicycle side? If you want, you can say it in the comments, I will add a general idea of this aspect, and I will only mention the front end below.

if you want to use Mini Program, you can only use Wechat Map api.

but if it is H5, Baidu map api and Amap api, are still recommended here because the map api that Wechat uses for H5 provides only a few functions, there is no big difference between them in this respect, and they are both free, so you can choose according to your personal preference.

the above mentioned map api, supports the dynamic addition of marked points in the map, and you can put your bike location as a marked point on the map. And these maps also support custom styles, which can be changed to your favorite style, but it should take a lot of time to change colors.

Front-end development ideas:

1. Open the page, use H5 api or Wechat jsapi to obtain the user's current longitude and latitude, and return it to the backend, which tells the front end the latitude and longitude of bicycles available near this longitude and latitude.

2. Use the longitude and latitude of these bikes to generate marked points and put them on the map.

3. (here, by default, the user is logged in, and you allow him to unlock his bike) Click the scan button to activate Wechat's scan function (both H5 and Mini Program can do this). After scanning the code successfully, the QR code content will be returned to you. This content is the content when you generate the QR code, and use these contents to adjust the background unlocking interface

.

4. After the lock is successfully unlocked, there will be a notification at the backend. After receiving the notification, the front end can display the timing page and other pages.

< hr >

beside the question, I don't know whether your bike supports ibeacon (that is, low-power Bluetooth). Now ofo wants users to open Bluetooth and detect that ofo, who scans your code, is really near you before opening the lock automatically, otherwise it can only be unlocked manually, which is also a means to prevent loss.

it just so happens that both H5 and Mini Program in Wechat support ibeacon,. If your bike also supports this technology, you can do it.


first of all, you need to call Wechat's map api to draw a map, and then you need to have a positioning device, a positioning engine, and an interface like Wechat to obtain positioning data.
then you unify the obtained data with the map. Then click on the map to show
with the address of the public platform development document
https://mp.weixin.qq.com/wiki.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35b6e-2bfac.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35b6e-2bfac.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?