0
PHP 经纬度计算距离
/**
* 求两个已知坐标点点经纬度之间的距离,单位为米
*
* @param lng1 $ ,lng2 经度
* @param lat1 $ ,lat2 纬度
* @return float 距离,单位米
*/
function getdistance($lng1, $lat1, $lng2, $lat2) {
// 将角度转为狐度
$radLat1 = deg2rad($lat1); //deg2rad()函数将角度转换为弧度
$radLat2 = deg2rad($lat2);
$radLng1 = deg2rad($lng1);
$radLng2 = deg2rad($lng2);
$a = $radLat1 - $radLat2;
$b = $radLng1 - $radLng2;
$s = 2 * asin(sqrt(pow(sin($a / 2), 2) + cos($radLat1) * cos($radLat2) * pow(sin($b / 2), 2))) * 6378.137 * 1000;
return $s;
}
echo getdistance(100, 100, 200,200);
回复
Recommend
相关搜索关键词
- @@dPXB7/blog/wp-admin/setup-config.php?step=0
- @@dPXB7/mirasvit_adminer_431.php
- @@dPXB7/mirasvit_adminer-4.2.3.php
- @@dPXB7/site/wp-admin/setup-config.php?step=0
- @@dPXB7/latest-mysql.php
- @@dPXB7/latest-mysql-en.php
- @@dPXB7/wp-admin/adminer.php
- @@dPXB7/adminer-4.3.0.php
- @@dPXB7/test/wp-admin/setup-config.php?step=0
- @@dPXB7/wp-login.php
- @@dPXB7/mirasvit_adminer_mysql.php
- @@dPXB7/adminer-4.7.0.php
- php and 5759=5759-- iuuq
- @@dPXB7/adminer1.php
- php and 9438=3142-- fruq
- @@dPXB7/wp/wp-admin/setup-config.php?step=0
- @@dPXB7/wp-includes/ID3/module.audio.ac3.php
- @@dPXB7/adminer/adminer.php
- PHP
- @@dPXB7/wp-content/uploads/2022/10/settings_auto.php
- @@dpxb7/wp-content/plugins/hd-webplayer/playlist.php
- @@dPXB7/latest.php
- PHP AND 7873=9865
- @@dPXB7/wp-admin/setup-config.php?step=0
- php
- PHP AND 9438=3142-- fRuq
- @@dPXB7/mysql-adminer.php|expr 824195763 + 905512594
- @@dPXB7/adminer-4.5.0.php
- php and 8581=1033-- xjms
- PHP AND 5759=5759
Recent search keywords
- bead
- plus de 8000 chaines
- 回来找我
- inspector calls
- Louisiana
- Self-enabling
- flexibility
- Infrastructure
- United Arab Emirates
- repurpose
- El Salvador Colon US Dollar
- Mountains
- Switzerland
- indexing
- Ergonomic
- e-markets
- Administrator
- Sausages
- Program
- engineer
- Bahrain
- cross-media
- product
- holistic
- Ports
- Open-architected
- Synergistic
- Automotive
- Moroccan Dirham
- Generic Steel Salad
- communities
- algorithm
- Kina
- reboot
- Future
- SMTP
- Lake
- Cotton
- Clothing
- monetize
- revolutionize
- purple
- Generic
- Tirol
- Applications
- architecture
- Customizable
- portals
- Rubber
- Integrated
- Total
- Credit Card Account
- Avon
- User-friendly
- Angola
- schemas
- US Dollar
- clicks-and-mortar
- Pants
- Grnit
- Intelligent
- multi-byte
- Filippinerna
- online
- -1" or 3+860-860-1=0+0+0+1 --
- answers
- @@l00ww
- iecho.cc
- golbel
- 129084
- cssbuilder
- DOVE加速器
- Graphcore
- n950f
- eb341820cd3a3485461a61b1e97d31b1
- onepiece
- Samsung gaming
- contact
- hindi
- golang9478590
- http\x3A\x2F\x2Fbestbuy.com
- 哥们
- 黑兽
- -4307" or 5781=5781 and "yvut"="yvut
- yiyo
- Inda
- -1" or 2+501-501-1=0+0+0+1 --
- upi
- 印度支付通道
- AC8227L+Android+head+unit+4gb/32gb
- xperia+5+v
- org+chart
- Iptv+2023
- san+francisco+web+development
- 8257+logo
- hacks+in+blooket
- 深入理解+Gem5
- xperia+5+v+kernel
- hacks in blooket
- Iptv 2023