|
@@ -640,7 +640,7 @@ switch ($action) {
|
|
|
exit();
|
|
exit();
|
|
|
break;
|
|
break;
|
|
|
case 'main_map_new':
|
|
case 'main_map_new':
|
|
|
- //include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
|
|
|
|
|
|
|
+ include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
|
|
|
//修改添加port_of_transshipment 和port_of_transshipment_name的坐标获取(有为空的可能)
|
|
//修改添加port_of_transshipment 和port_of_transshipment_name的坐标获取(有为空的可能)
|
|
|
$serial_no = $_REQUEST["serial_no"];
|
|
$serial_no = $_REQUEST["serial_no"];
|
|
|
//$serial_no = "F41E6016-1A97-4C93-8198-53D8B3B26220";
|
|
//$serial_no = "F41E6016-1A97-4C93-8198-53D8B3B26220";
|
|
@@ -673,35 +673,35 @@ switch ($action) {
|
|
|
// {"lng":"100.88333333","lat":"13.08333333","label":"Destination","infor":"LAEM CHABANG PORT,THAILAND","sort":"1","stime":null,"ptype":"pol"},
|
|
// {"lng":"100.88333333","lat":"13.08333333","label":"Destination","infor":"LAEM CHABANG PORT,THAILAND","sort":"1","stime":null,"ptype":"pol"},
|
|
|
// {"lng":"-122.28640000","lat":"37.79784000","label":"Transfer","infor":"OAKLAND, CA, USA","sort":"2","stime":null,"ptype":"pod"}]';
|
|
// {"lng":"-122.28640000","lat":"37.79784000","label":"Transfer","infor":"OAKLAND, CA, USA","sort":"2","stime":null,"ptype":"pod"}]';
|
|
|
//$rss = json_decode($json,true);
|
|
//$rss = json_decode($json,true);
|
|
|
- // global $mapdb;
|
|
|
|
|
- // //查询线(包含所有的线)
|
|
|
|
|
- // error_log("select * from get_track_data('$serial_no',true)");
|
|
|
|
|
- // $map_sql = "select * from get_track_data('$serial_no',true)";
|
|
|
|
|
- // $Line = $mapdb->GetAll($map_sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $map_sql), 0));
|
|
|
|
|
|
|
+ global $mapdb;
|
|
|
|
|
+ //查询线(包含所有的线)
|
|
|
|
|
+ error_log("select * from get_track_data('$serial_no',true)");
|
|
|
|
|
+ $map_sql = "select * from get_track_data('$serial_no',true)";
|
|
|
|
|
+ $Line = $mapdb->GetAll($map_sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $map_sql), 0));
|
|
|
|
|
|
|
|
- // error_log("total:".count($Line));
|
|
|
|
|
- // $solidLine = array();
|
|
|
|
|
- // $dottedLine = array();
|
|
|
|
|
- // $rangePoint = array();
|
|
|
|
|
- // foreach($Line as $line){
|
|
|
|
|
- // if($line['tp'] == "1"){
|
|
|
|
|
- // $solidLine[] = $line;
|
|
|
|
|
- // }elseif($line['tp'] == "0"){
|
|
|
|
|
- // $dottedLine[] = $line;
|
|
|
|
|
- // }else{
|
|
|
|
|
- // $rangePoint[] = $line;
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // error_log("total_1:".count($solidLine));
|
|
|
|
|
- // error_log("total_2:".count($dottedLine));
|
|
|
|
|
- // error_log("total_3:".count($rangePoint));
|
|
|
|
|
- // //如果没有虚线,这这个范围点也是异常的,不需要显示
|
|
|
|
|
- // if(empty($dottedLine)){
|
|
|
|
|
- // $rangePoint = array();
|
|
|
|
|
- // }
|
|
|
|
|
- // $data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine,"rangePoint"=>$rangePoint);
|
|
|
|
|
- // common::echo_json_encode(200, $data);
|
|
|
|
|
- common::echo_json_encode(200, $rss);
|
|
|
|
|
|
|
+ error_log("total:".count($Line));
|
|
|
|
|
+ $solidLine = array();
|
|
|
|
|
+ $dottedLine = array();
|
|
|
|
|
+ $rangePoint = array();
|
|
|
|
|
+ foreach($Line as $line){
|
|
|
|
|
+ if($line['tp'] == "1"){
|
|
|
|
|
+ $solidLine[] = $line;
|
|
|
|
|
+ }elseif($line['tp'] == "0"){
|
|
|
|
|
+ $dottedLine[] = $line;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $rangePoint[] = $line;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ error_log("total_1:".count($solidLine));
|
|
|
|
|
+ error_log("total_2:".count($dottedLine));
|
|
|
|
|
+ error_log("total_3:".count($rangePoint));
|
|
|
|
|
+ //如果没有虚线,这这个范围点也是异常的,不需要显示
|
|
|
|
|
+ if(empty($dottedLine)){
|
|
|
|
|
+ $rangePoint = array();
|
|
|
|
|
+ }
|
|
|
|
|
+ $data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine,"rangePoint"=>$rangePoint);
|
|
|
|
|
+ common::echo_json_encode(200, $data);
|
|
|
|
|
+ //common::echo_json_encode(200, $rss);
|
|
|
exit();
|
|
exit();
|
|
|
break;
|
|
break;
|
|
|
case 'main_welcome':
|
|
case 'main_welcome':
|