map.wxml
<!--pages/map/map.wxml--> <view class="container"> <map id="myMap" style="width: 100%; height: 100%;" latitude="{{latitude}}" longitude="{{longitude}}" markers="{{markers}}" show-location ></map> </view>
map.js
// pages/map/map.js Page({ data: { latitude: 31.22786, longitude: 121.46658, markers: [{ id: 1, latitude: 31.22786, longitude: 121.46658, name: '上海招商局广场' }] }, onReady(e) { this.mapCtx = wx.createMapContext('myMap') } })
更多ECSHOP内容来自木庄网络博客
标签:ECSHOP
相关阅读 >>
更多相关阅读请进入《ECSHOP》频道 >>