久久久久久一区_中文字幕在线不卡_精品不卡_久久久网_精品亚洲一区二区三区在线观看_欧美精品一区二区三区在线四季

BIGEMPA Js API示例中心

加載大量標(biāo)注源代碼展示

代碼編輯區(qū) 運(yùn)行 下載 還原
<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8" />
        <meta
            name="viewport"
            content="initial-scale=1,maximum-scale=1,user-scalable=no"
        />
        <!--
        以下CSS地址請(qǐng)?jiān)诎惭b軟件了替換成本地的地址
        CSS地址請(qǐng)使用:
        http://localhost:9000/bigemap.js/v2.1.0/bigemap.css
        軟件下載地址 http://www.25psqa8o.cn/reader/download/detail201802017.html
    -->
        <link
            href="http://www.25psqa8o.cn:9000/bigemap.js/v2.1.0/bigemap.css"
            rel="stylesheet"
        />
        <!--
        JS地址請(qǐng)使用:
        http://localhost:9000/bigemap.js/v2.1.0/bigemap.js
    -->
        <script src="http://www.25psqa8o.cn:9000/bigemap.js/v2.1.0/bigemap.js"></script>
        <script src="/offline_data/bm-plot.min.js"></script>
        <style>
            body {
                margin: 0;
                padding: 0;
            }
            #map {
                position: absolute;
                top: 0;
                bottom: 0;
                width: 100%;
            }
            .tools {
                width: 100px;
                height: 40px;
                display: flex;
                position: absolute;
                top: 20px;
                right: 60px;
                align-items: center;
                z-index: 99;
            }
            .item {
                width: 100px;
                /* height: 30px; */
                text-align: center;
                /* line-height: 30px; */
                background-color: #59acff;
                color: antiquewhite;
                padding: 8px;
                border-radius: 4px;
            }
        </style>
        <title>Google Map Streets</title>
    </head>
    <body>
        <div id="map">
            <div class="tools">
                <h3 class="item">清除所有點(diǎn)</h3>
            </div>
        </div>
        <script>
            // 軟件配置信息地址,軟件安裝完成之后使用本地地址,如:http://localhost:9000
            BM.Config.HTTP_URL = "http://www.25psqa8o.cn:9000";

            // 在ID為map的元素中實(shí)例化一個(gè)地圖,并設(shè)置地圖的ID、中心點(diǎn),默認(rèn)的級(jí)別和顯示級(jí)別控件
            var map = BM.map("map", "bigemap.zhongkexingtu", {
                center: [20, 94],
                zoom: 10,
                zoomControl: true,
                attributionControl: false,
            });
            window.lastMarker = null;
            window.svg = new BM.Plot.SvgLayer({}).addTo(map);
            let all1 = [];
            for (let i = 0; i < 20000; i++) {
                let ss22 = new BM.Plot.IconOverlay(
                    "http://www.25psqa8o.cn/mapoffline/marker/2.png",
                    [20 + Math.random() * 20, 94 + Math.random() * 50],
                    {
                        size: { x: 40, y: 40 },
                    }
                );
                all1.push(ss22);
            }
            svg.addLayers(all1);
            // 鼠標(biāo)左鍵點(diǎn)擊事件
            svg.addOnClickListener(function (e) {
                // console.log(e.layer);
                if (window.lastMarker != null) {
                    window.lastMarker.setIcon(
                        "http://www.25psqa8o.cn/mapoffline/marker/2.png",
                        {
                            size: { x: 40, y: 40 },
                        }
                    );
                    window.lastMarker.setSize({x:40,y:40});
                    window.lastMarker = null;
                }
                e.layer.setIcon(
                    "http://www.25psqa8o.cn/mapoffline/marker/11.png",
                );
                   // 設(shè)置圖標(biāo)大小
                e.layer.setSize({x:60,y:60});
                window.lastMarker = e.layer;
            });
            // 鼠標(biāo)右鍵點(diǎn)擊事件
            svg.addOnContextMenuListener(function (e) {
                console.log(e.layer);
            });
            // 鼠標(biāo)移入移出事件
            // svg.addOnMousemoveListener(function(e){
            //     console.log(`移入`,e.layer);
            // })

            document
                .querySelector(".item")
                .addEventListener("click", function (e) {
                    svg.clearLayers();
                });
        </script>
    </body>
</html>
            
主站蜘蛛池模板: 亚洲高清免费视频 | 欧美成人精品一区二区 | 九九久久国产 | 成人av免费看 | 久久久精品一区 | 狠狠色综合欧美激情 | 日韩在线视频观看 | 成人影视网 | 高清二区 | 成人在线免费观看视频 | 国产在线小视频 | av最新网址 | 成人区精品一区二区婷婷 | 久久人| 日本一区二区不卡 | 日韩中文字幕无码一区二区三区 | 久久9色| 精品欧美一区二区三区久久久 | 久久久综合色 | 日韩1区2区3区 | www.av在线 | 国产伦精品一区二区三区视频网站 | 日韩欧美一区二区视频 | 91精品国产一区二区三区蜜臀 | 精品国产一区二区在线 | 日韩成人在线免费观看 | www..99热| 欧美日韩一区二区三区不卡视频 | 九色91视频 | 最新国产精品 | 中文字幕三级 | 黄色在线观看网站 | 中文字幕在线资源 | 欧美一级黄色片网站 | 欧美视频在线免费 | 日韩专区一区二区三区 | 欧美一区二区在线免费观看 | 一区二区蜜桃 | 成人综合在线观看 | 欧美一级毛片免费看 | 91小视频 |