BIGEMPA Js API示例中心

闪烁点源代码展示

代码编辑区 运行 下载 还原
<!DOCTYPE html>

<html>
<head>
    <meta charset='UTF-8'/>
    <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/>
    <!--
        以下CSS地址请在安装软件了替换成本地的地址
        CSS地址请使用:
        http://localhost:9000/bigemap.js/v2.1.0/bigemap.css
        软件下载地址 http://www.bigemap.com/reader/download/detail201802017.html
    -->
    <link href='http://www.bigemap.com:9000/bigemap.js/v2.1.0/bigemap.css' rel='stylesheet'/>
    <!--
        JS地址请使用:
        http://localhost:9000/bigemap.js/v2.1.0/bigemap.js
    -->
    <script src='http://www.bigemap.com:9000/bigemap.js/v2.1.0/bigemap.js'></script>
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        #map {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 100%;
        }
        .pulse-icon {
            display: inline-block;
            width: 15px;
            height: 15px;
            border-radius: 100%;
            background-color: #2f8;
            position: relative;
            box-shadow: 1px 1px 8px 0 rgba(0, 0, 0, 0.75);
        }

        .pulse-icon:after {
            content: "";
            box-shadow: 0 0 6px 2px #2f8;
            animation: pulsate 1s ease-out;
            animation-iteration-count: infinite;
            animation-delay: 1.1s;
            -webkit-border-radius: 100%;
            border-radius: 100%;
            height: 300%;
            width: 300%;
            animation: pulsate 2s infinite;
            position: absolute;
            margin: -100% 0 0 -100%;
        }

        @keyframes pulsate {
            0% {
                transform: scale(0.1, 0.1);
                opacity: 0;
                -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
                filter: alpha(opacity=0);
            }
            50% {
                opacity: 1;
                -ms-filter: none;
                filter: none;
            }
            100% {
                transform: scale(1.2, 1.2);
                opacity: 0;
                -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
                filter: alpha(opacity=0);
            }
        }
    </style>
    <title>Google Map Streets</title>
</head>
<body>
<div id='map'></div>
<script>
    //软件配置信息地址,软件安装完成之后使用本地地址,如:http://localhost:9000
    BM.Config.HTTP_URL = 'http://www.bigemap.com:9000';
    // 在ID为map的元素中实例化一个地图,并设置地图的ID号为 bigemap.googlemap-streets,ID号程序自动生成,无需手动配置,并设置地图的投影为百度地图 ,中心点,默认的级别和显示级别控件
    var map = BM.map('map', 'bigemap.googlemap-satellite', {center: [30, 104], zoom: 4, zoomControl: true,attributionControl:false});
    var myIcon = BM.divIcon({className: 'my-div-icon', html: '<div><span class="pulse-icon"></span></div>'});
    for(let i=0;i<15;i++){
        BM.marker([20+20*Math.random(),80+40*Math.random()], {icon: myIcon}).addTo(map);
    }
</script>
</body>
</html>