generated from liutk/owl-admin-base
测试 不切换坐标系
parent
b3f164c23f
commit
0f910419ff
|
|
@ -80,12 +80,12 @@ class SignController extends Controller
|
|||
$lon = $request->input('lon');
|
||||
$lat = $request->input('lat');
|
||||
// 切换坐标系
|
||||
$locationType = $request->input('location_type', 'wgs84');
|
||||
if ($locationType == 'wgs84') {
|
||||
$res = wgs84ToGcj02($lat, $lon);
|
||||
$lon = $res['lon'];
|
||||
$lat = $res['lat'];
|
||||
}
|
||||
// $locationType = $request->input('location_type', 'wgs84');
|
||||
// if ($locationType == 'wgs84') {
|
||||
// $res = wgs84ToGcj02($lat, $lon);
|
||||
// $lon = $res['lon'];
|
||||
// $lat = $res['lat'];
|
||||
// }
|
||||
// 计算距离
|
||||
$distance = $service->haversineDistance(
|
||||
$lat,
|
||||
|
|
|
|||
Loading…
Reference in New Issue