前言
本文中描述某一页面的文档用 page.js/json/wxml/wxss
表示。
地图全屏显示
-
地图横版显示
在map_page.wxml 中写入:
<view>
<map id="map" longitude='113.324520' latitude='23.099994' scale="14" style="height: 100%;width: { {width}}px;"></map>
</view>
-
地图竖版(全屏)显示
在map_page.wxml 中写入:
<view>
<map id="map" longitude='113.324520' latitude='23.099994' scale="14" markers='{ {markers}}' bindmarkertap="markertap" bindregi"regionchange" show-location style="width: 100%;height: { {height}}px;" show-compass="false"></map>
</view>
在page.js 中写入:
onLoad: function(options) {
var that = this
wx.getSystemInfo({
success: function(res) {