地图满屏问题
发布于 5 年前 作者 myu 15748 次浏览 来自 问答

设置地图满屏显示,style里设置高度为100%,不生效,设置100vh,在开发工具上显示满屏,但真机上显示下方还留了有一点距离

<map id=“map” longitude=“113.324520” latitude=“23.099994” scale=“14” controls="{{controls}}" bindcontroltap=“controltap” markers="{{markers}}" bindmarkertap=“markertap” polyline="{{polyline}}" bindregionchange=“regionchange” show-location style=“width: 100%; height: 100vh;”></map>

真机上显示,下方还留有一定的空白距离

模拟器上显示正常

2 回复

我试着没有用vh 。试着用。

wx.getSystemInfo({

      success: function (res) {

        that.setData({

          m_height: res.windowHeight

        })

      }

    });

去设置地图高度。还是一样的。在真机上下边还是有点儿没有满屏。空了点儿。测试手机魅族pro6

vh很多都不生效

回到顶部