generated from liutk/owl-admin-base
main
parent
0f910419ff
commit
4eca061d2d
|
|
@ -141,13 +141,13 @@ class SignController extends Controller
|
|||
if ($maxDistance > 0 && $type == SignType::Normal) {
|
||||
$lon = $request->input('position.lon');
|
||||
$lat = $request->input('position.lat');
|
||||
$locationType = $request->input('position.location_type', 'wgs84');
|
||||
// 切换坐标系
|
||||
if ($locationType == 'wgs84') {
|
||||
$res = wgs84ToGcj02($lat, $lon);
|
||||
$lon = $res['lon'];
|
||||
$lat = $res['lat'];
|
||||
}
|
||||
// $locationType = $request->input('position.location_type', 'wgs84');
|
||||
// if ($locationType == 'wgs84') {
|
||||
// $res = wgs84ToGcj02($lat, $lon);
|
||||
// $lon = $res['lon'];
|
||||
// $lat = $res['lat'];
|
||||
// }
|
||||
$distance = $service->haversineDistance(
|
||||
$lat,
|
||||
$lon,
|
||||
|
|
|
|||
Loading…
Reference in New Issue