在线免费看污_亚洲视频在线免费观看_91精品国产电影_久久国产亚洲_久久四虎影院_亚洲欧美a_国产精品一区二区三

顯示源代碼
GIS畫線
 開發(fā)文檔
            <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link  rel='stylesheet' />
    <script src='http://ua.bigemap.com:30081/bmsdk/bigemap-gl.js/v1.1.0/bigemap-gl.js'></script>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    #container {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 100%;
    }
</style>

<body>
    <div id="container"></div>
    <div id="loadingOverlay">
        <h1>Loading...</h1>
    </div>
</body>
<script>

    bmgl.Config.HTTP_URL = 'http://ua.bigemap.com:30081/bmsdk/';
    var viewer = new bmgl.Viewer('container',{mapId: 'bigemap.dc-satellite'});
    viewer.clock.shouldAnimate = true;

    //起點(diǎn)經(jīng)緯度
    var startLatitude = 35;
    var startLongitude = -120;
    var endLongitude;
    //立即執(zhí)行
    var startTime = bmgl.JulianDate.now();

    // Add a polyline to the scene. Positions are dynamic.
    var isConstant = false;
    //添加線段
    var redLine = viewer.entities.add({
        polyline: {
            // This callback updates positions each frame.
            positions: new bmgl.CallbackProperty(function (time, result) {
                endLongitude =
                    startLongitude +
                    0.001 * bmgl.JulianDate.secondsDifference(time, startTime);
                return bmgl.Cartesian3.fromDegreesArray(
                    [startLongitude, startLatitude, endLongitude, startLatitude],
                    bmgl.Ellipsoid.WGS84,
                    result
                );
            }, isConstant),
            width: 5,
            material: bmgl.Color.RED,
        },
    });

    var startCartographic = bmgl.Cartographic.fromDegrees(
        startLongitude,
        startLatitude
    );

    // use scratch object to avoid new allocations per frame.
    var endCartographic = new bmgl.Cartographic();
    var scratch = new bmgl.Cartographic();
    var geodesic = new bmgl.EllipsoidGeodesic();

    // Calculate the length of the line
    function getLength(time, result) {
        // Get the end position from the polyLine's callback.
        var endPoint = redLine.polyline.positions.getValue(time, result)[1];
        endCartographic = bmgl.Cartographic.fromCartesian(endPoint);

        geodesic.setEndPoints(startCartographic, endCartographic);
        var lengthInMeters = Math.round(geodesic.surfaceDistance);
        return (lengthInMeters / 1000).toFixed(1) + " km";
    }

    function getMidpoint(time, result) {
        // Get the end position from the polyLine's callback.
        var endPoint = redLine.polyline.positions.getValue(time, result)[1];
        endCartographic = bmgl.Cartographic.fromCartesian(endPoint);

        geodesic.setEndPoints(startCartographic, endCartographic);
        var midpointCartographic = geodesic.interpolateUsingFraction(
            0.5,
            scratch
        );
        return bmgl.Cartesian3.fromRadians(
            midpointCartographic.longitude,
            midpointCartographic.latitude
        );
    }

    // Label the polyline with calculated length.
    var label = viewer.entities.add({
        position: new bmgl.CallbackProperty(getMidpoint, isConstant),
        label: {
            // This callback updates the length to print each frame.
            text: new bmgl.CallbackProperty(getLength, isConstant),
            font: "20px sans-serif",
            pixelOffset: new bmgl.Cartesian2(0.0, 20),
        },
    });

    // Keep the view centered.
    viewer.trackedEntity = label;

</script>

</html>                                                                                                                                                        
主站蜘蛛池模板: 日本人视频-jlzz jlzz jlzz | 日本xxxx18色视频在线观看 | 三级特黄| 欧美日韩亚洲国产无线码 | 99在线免费观看视频 | 91视频一区 | 日本大学生免费一级一片 | 久久99国产精一区二区三区! | 日韩大片在线观看 | 日本黄色一级视频 | 在线观看日韩视频 | 欧美日韩在线免费 | 性xxxx免费观看视频 | 久久三级毛片 | 免费三级在线 | 人人玩人人弄 | 欧美日韩中 | 国模明明大胆啪啪人体 | 韩国高清色www在线安全 | 日日操天天操夜夜操 | 欧美色视频超清在线观看 | 狠狠色狠狠色很很综合很久久 | 国产大片中文字幕 | 日韩在线不卡一区在线观看 | 国产免费制服丝袜网站 | 亚洲天堂精品在线观看 | 玖草| аⅴ资源中文在线天堂 | 九九久久免费视频 | 99热成人精品免费久久 | 亚洲成人高清在线观看 | 久久国产精品久久国产片 | 激情五月深爱五月 | 欧美日本日韩 | xxxww中国 | 中文字幕人成不卡一区 | 欧美一级做一级爱a做片性 欧美一卡二卡三卡 | 久热国产精品 | 欧美成人做性视频在线播放 | 中文字幕日韩高清 | 欧美性88xx|