收藏
回答

关于map组件挡住view层的问题?

在一个页面中使用了map组件,正常展示效果如下图:


---------------------------------------------

可是在安卓手机中10次里面有8次会发生map跑上去挡住view层。ios中偶尔也会出现,但最后map会自动闪回到下方,而在安卓中map就一直在上方挡着。


下面是代码:


wxml:
<view class="header">
    <image src="/images/aboutus-headimg.jpg" mode="widthFix" />  
</view>
<view class="mapwrapper">
    <map
        class="map"
        id="map"
        longitude="{{page_data.lon}}"
        latitude="{{page_data.lat}}"
        scale="15"
        markers="{{markers}}"
        show-location
        bindtap="openmap"
        bindmarkertap="openmap"
        bindcallouttap="openmap"
        >
    </map>
</view>
 
 
wxss:
.header { display: flex; flex-direction: column; }
.header image { width: 100%; }
.mapwrapper { display: flex; flex-direction: column; min-height: 100rpx; padding: 0 30rpx; margin: 0; }
.map { width:100%; height: 400rpx; margin-top:30rpx; }


回答关注问题邀请回答
收藏

3 个回答

登录 后发表内容
问题标签