tongshanglei 1 year ago
parent
commit
f8421646be
1 changed files with 3 additions and 0 deletions
  1. 3 0
      catch/map/controller/RouteMap.php

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

@@ -579,6 +579,9 @@ class RouteMap extends CatchController
         $rows=[];
         while($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
             $station_info=Db::table('stations')->where('mac',$row['RF_ID'])->find();
+            if(!$station_info){
+                continue;
+            }
             // $wgsLoc = \algorithm\Geometry::wgsTOgcj($row['GPS_Y'],$row['GPS_X']);
             $wgsLoc = \algorithm\Geometry::gcj02ToWgs84((float)$station_info['latitude'],(float)$station_info['longitude']);
             // $lngLat = \algorithm\Geometry::convertGcj02ToBd09($wgsLoc['lat'],$wgsLoc['lng']);