<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>装货区域</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <style>
    body,
    html,
    #container {
        overflow: hidden;
        width: 100%;
        height: 100%;
        margin: 0;
        font-family: "微软雅黑";
    }
    </style>
    <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=您的密钥"></script>
</head>
<body>
    <div id="container"></div>
    <ul class="drawing-panel" style="z-index: 99;">
        
    </ul>
</body>
</html>

<script>
var map = new BMapGL.Map('container');
  
var point = new BMapGL.Point(110.65468,39.27222);
map.centerAndZoom(point, 9);
map.enableScrollWheelZoom(true);

// 绘制区县
var bd = new BMapGL.Boundary();
bd.get('东胜区', function (rs) {
    // console.log('外轮廓：', rs.boundaries[0]);
    // console.log('内镂空：', rs.boundaries[1]);
    var hole = new BMapGL.Polygon(rs.boundaries, {
        fillColor: 'blue',
        fillOpacity: 0.2
    });
    map.addOverlay(hole);
});
  
var bd = new BMapGL.Boundary();
bd.get('准格尔旗', function (rs) {
    // console.log('外轮廓：', rs.boundaries[0]);
    // console.log('内镂空：', rs.boundaries[1]);
    var hole = new BMapGL.Polygon(rs.boundaries, {
        fillColor: 'yellow',
        fillOpacity: 0.1
    });
    map.addOverlay(hole);
});
  
var bd = new BMapGL.Boundary();
bd.get('伊金霍洛旗', function (rs) {
    // console.log('外轮廓：', rs.boundaries[0]);
    // console.log('内镂空：', rs.boundaries[1]);
    var hole = new BMapGL.Polygon(rs.boundaries, {
        fillColor: 'red',
        fillOpacity: 0.1
    });
    map.addOverlay(hole);
});
  
var bd = new BMapGL.Boundary();
bd.get('达拉特旗区', function (rs) {
    // console.log('外轮廓：', rs.boundaries[0]);
    // console.log('内镂空：', rs.boundaries[1]);
    var hole = new BMapGL.Polygon(rs.boundaries, {
        fillColor: 'black',
  