Mini Program this kind of merchant how far away from my position km is how to achieve?

clipboard.png

Mar.22,2021

solve

use Mini Program's official map interface to obtain your coordinate reference: https://developers.weixin.qq.
through the corresponding calculation, Get the straight line distance between two points reference: https://codeshelper.com/a/11.

principle

the merchant will submit an address when registering, and there is a corresponding longitude and latitude
when you log in, Mini Program can also get your longitude and latitude
and leave the rest to junior high school math

.

lbs get to know

Menu