地图上的组件在开发工具上能显示 但在手机上不能显示
发布于 6 年前 作者 wangjing 13849 次浏览 来自 问答
  1. 地图上的组件在开发工具上能显示 但在手机上不能显示


    开发工具上是这样显示的:




    有按钮和中间的图标

    但手机上是这样显示的:


    除了地图,什么也没有了,在开发工具里开发了老半天,在手机上一预览,居然变样了,很痛苦啊。



    界面和样式代码分别如下:

    <!--index.wxml-->
    <view>
      <map style="position:absolute" id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="16" controls="{{controls}}" bindcontroltap="controltap" markers="{{markers}}" bindmarkertap="markertap" polyline="{{polyline}}" bindregionchange="regionchange"
      include-points="{{include_points}}" show-location="true" style="width: 100%; height: 100vh;">
      </map>
      <view class="center-area">
        <image style="width: 30px; height: 30px;" src="../../imgs/icon-map-marker.png"></image>
      </view>
      <view class="weui-msg__extra-area">
        <view class="weui-footer">
          <button style="position:absolute;margin-left:5px;" bindtap="btn_refresh_location">.</button>
          <button style="width:70%" type="primary" bindtap="btn_use_now">立即使用</button>
        </view>
      </view>
    </view>

__
__

 

/**index.wxss**/
.center-area {
    position:fixed;
    margin:auto;
    left:0;
    right:0;
    top:0;
    bottom:0;
    width:30px;
    height:30px;
}

2.点击界面中的菜单按钮后,地图组件就什么也没有了

__
__

点击右上角的菜单按钮后,地图组件感觉就瘫痪了

求高手解答!!!!

4 回复

楼主解决了吗?

怎么没有反应了?同求,希望小程序团队有所回应

include-points怎么用啊 你是填的什么数据

我也遇到了这个问题。目测是在ios上地图的组件被设置成了永远在最上层,甚至于调试打开的vconsole的浮动控件拖拽也会被隐藏在地图下面。见图

个人认为是一个bug,请小程序团队确认。

回到顶部