测试 不切换坐标系

main
panliang 2024-06-12 15:06:02 +08:00
parent b3f164c23f
commit 0f910419ff
1 changed files with 6 additions and 6 deletions

View File

@ -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,