您当前的位置: 首页 > 

暂无认证

  • 2浏览

    0关注

    92582博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

高德地图中map.getZoom()获取地图级别 map.getCenter().toString()获取地图中心点 zoom初始化地图级别 center初始化地图中心点

发布时间:2020-08-04 20:32:26 ,浏览量:2

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> #container { width: 100%; height: 1000px; position: absolute; left: 0px; top: 0px; } </style> <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=c6e183994605d131f97132d2f296d713"></script> </head> <body> <script> window.onload=function() { var map=new AMap.Map('container',{//对象 zoom:11,//初始的地图级别 center:[121,30]//初始化的地图的中心点 }); console.log(map.getZoom()); console.log(map.getCenter().toString()); } /*双击可以调整高德地图的级别
			zoom 改变初始地图的级别,zoom值越高,相当于鼠标双击放大,内容越详细,范围越小
			center 改变初始地图的中心点,是一个数组,包含经纬度*/ /*getZoom() 获取级别

getCenter()   getCenter().toString() 获取中心点*/ </script> <div id="container"></div> </body> </html> 

在这里插入图片描述

关注
打赏
1653961664
查看更多评论
立即登录/注册

微信扫码登录

0.0478s