使用高德地图绘制北京南站

<!doctype html>
<html lang="en" >
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <style type="text/css">
      h3{
        font-size: 1.17em;
        line-height: 1.4;
        font-weight: bold;
        margin: 2px;
      }
      hr{
        margin: 1px;
      }
      html,body{
        width: 100%;
        height: 100%;
        margin: 0px;
      }
      .map{
        height: 100%;
        width: 100%;
        float: left;
      }
    #mapDiv .amap-indoormap-floorbar-control{bottom:10%}

    </style>
    <title>室内地图</title>
  </head>
  <body>
    <div id="mapDiv" class="map" tabindex="0"></div>
    <script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.15&key=你的key值&plugin=AMap.ToolBar'></script>
    <script type="text/javascript">
          var map = new AMap.Map('mapDiv', {
              resizeEnable: false,
              center:[116.37906, 39.864918],
              zoom:17,
              showIndoorMap: true
          });
          map.on('indoor_create', function() {
            map.indoorMap.showIndoorMap('B000A83AJN',2);
          })
        //   如果在react 或者框架中使用 记得 const AMap = window.AMap;直接使用AMap会报错,可以使其成为全局
    </script>
  </body>
  
</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值