tongshanglei 1 年之前
父节点
当前提交
f8421646be
共有 1 个文件被更改,包括 3 次插入0 次删除
  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']);