tongshanglei 2 years ago
parent
commit
973891ebd9
1 changed files with 3 additions and 2 deletions
  1. 3 2
      catch/map/controller/RouteMap.php

+ 3 - 2
catch/map/controller/RouteMap.php

@@ -579,9 +579,10 @@ class RouteMap extends CatchController
         $rows=[];
         while($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
             // $wgsLoc = \algorithm\Geometry::wgsTOgcj($row['GPS_Y'],$row['GPS_X']);
+            $wgsLoc = \algorithm\Geometry::gcj02ToWgs84((float)$row['GPS_Y'],(float)$row['GPS_X']);
             // $lngLat = \algorithm\Geometry::convertGcj02ToBd09($wgsLoc['lat'],$wgsLoc['lng']);
-            // $row['GPS_X']=$lngLat['lng'];
-            // $row['GPS_Y']=$lngLat['lat'];
+            $row['GPS_X']=$wgsLoc['lng'];
+            $row['GPS_Y']=$wgsLoc['lat'];
             $rows[]=$row;
         }
         // var_dump($rows);