#当前位置经纬度 经度:117.215637   纬度:39.1373367
#表中经纬度字段 经度:longitude    纬度:latitude
select * from(
SELECT id,longitude,latitude, 
ROUND(6378.138*2*ASIN(SQRT(POW(SIN((39.1373367*PI()/180-latitude*PI()/180)/2),2)+COS(39.1373367*PI()/180)*COS(latitude*PI()/180)*POW(SIN((117.215637*PI()/180-longitude*PI()/180)/2),2)))*1000) AS juli
FROM table_name) as tmp_table_name
where juli < 1000
order by juli

  如何查询地址的经纬度:

百度工具:https://api.map.baidu.com/lbsapi/getpoint/index.html

相关文章:

  • 2021-12-19
  • 2021-11-27
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-11-21
  • 2021-09-01
猜你喜欢
  • 2022-01-15
  • 2022-02-05
  • 2021-12-14
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
相关资源
相似解决方案