后浪云百度小程序教程:MapContext
- MapContext
- 示例
- 图片示例
- 代码示例
- 示例
MapContext
解释:map 返回值。
示例
跳转编辑工具
在开发者工具中打开
在 WEB IDE 中打开
扫码体验
代码示例
请使用百度APP扫码
图片示例
代码示例
- SWAN
- JS
<view class="wrap">
<map id="myMap"
longitude="{{longitude}}"
latitude="{{latitude}}"
style="width: 100%"
markers="{{markers}}"
show-location>
</map>
<button type="primary" bindtap="includePoints">缩放视野展示所有经纬度</button>
<button type="primary" bindtap="getCenterLocation">获取位置</button>
<button type="primary" bindtap="translateMarker">平移 marker</button>
<button type="primary" bindtap="moveToLocation">移动位置</button>
<button type="primary" bindtap="getRegion">获取当前地图的视野范围</button>
<button type="primary" bindtap="getScale">获取当前地图的缩放级别</button>
</view>
版权声明:
作者:后浪云
链接:https://www.idc.net/help/186522/
文章版权归作者所有,未经允许请勿转载。
THE END