zoukankan      html  css  js  c++  java
  • 从坐标数组中读取数据在地图中实时打点,第一个点与第一个点相隔5秒钟

    <?php
     $content = file_get_contents("http://web.cellpies.com/api/driving/getVehicleLocationPoints?vehicleDeviceId=0400000000030603&timeType=4&startTime=2017-03-17%2013:00:00&stopTime=2017-03-17%2014:00:00");
     $data = json_decode($content);
     for($i=0;$i<1;$i+=1){
         //echo '编号:'.$data->data[$i]->time.'<br>';
         $gpsx=$data->data[$i]->gpsx;
         $gpsy=$data->data[$i]->gpsy;
    
    echo <<<_END
    <!doctype html>
    <html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
        <title>点标记</title>
        <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
        <script src="js/addMarker.js" type="text/javascript"></script>
        <style>
            .marker {
                color: #ff6600;
                padding: 4px 10px;
                border: 1px solid #fff;
                white-space: nowrap;
                font-size: 12px;
                font-family: "";
                background-color: #0066ff;
            }
        </style>
        <script src="http://webapi.amap.com/maps?v=1.3&key=您申请的key值"></script>
        <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
    </head>
    <body>
    <div id="container"></div>
    
    <script>   //在前一个script体中调用后一个script体中的函数出现问题,如需调用可能应在同一个script体中
        var marker, map = new AMap.Map("container", {
            resizeEnable: true,
            center: [116.397428, 39.90923],
            zoom: 13
        });
        if($i==0)
        addMarker(116.397428, 39.90923);
        setTimeout("updateMarker(116.391467,39.947761)","5000");
     
    </script>
    </body>
    </html>
    
    _END;
     }
     
    
    ?>
  • 相关阅读:
    表格转换,多行聚集成列,长列转换成多行
    记第一次写数据库文章总结
    免疫 TCR BCR 病毒滴度
    Genome-wide Study Identifies Association between HLA-B*55:01 and Self-Reported Penicillin Allergy
    LD plot
    beta p-value SE
    蛋白截断变异(protein-truncating variant,PTV)
    The human noncoding genome defined by genetic diversity
    Fst计算
    LD Score regression文章 ;confounding
  • 原文地址:https://www.cnblogs.com/vactor/p/6678539.html
Copyright © 2011-2022 走看看