map组件问题
发布于 5 年前 作者 pingzhu 10170 次浏览 来自 问答

最近在学习小程序开发,遇到下面两个棘手问题,两个问题均在开发工具正常,在手机(小米5s)显示异常。

两个问题均上正常的和异常的截图,希望有开发人员能反馈,或者有高手能给建议,先谢谢了。

  1. 在手机上显示地图后,地图覆盖筛选view,无法再进行筛选。

    开发工具-正常:

    手机-异常:



  2. 在手机上用swiper view左滑查看地图,地图只显示一半,view没有切换。

    开发工具-正常:


    手机-异常:


5 回复

微信版本6.5.22,手机小米5s。

感觉问题出在map放到swiper中,贴出相关代码:

<swiper class=“swiper-box” current="{{selectedTab}}" bindchange=“slideChange”>

<swiper-item>

<scroll-view scroll-y scroll-with-animation upper-threshold=“1” style=“height: 100%;” bindscrolltolower=‘bottomEvent’ bindscrolltoupper=‘upperEvent’>

<view wx:if=’{{no_orders == true}}’ class=‘detail-bottom’>没有订单~</view>

<block wx:for="{{orders}}" wx:key=“index”>

<block wx:for="{{item}}" wx:key=“index”>

<view class=“detail-item”>

<image class=‘detail-item-image’ src=’/resources/image/technics.svg’ />

<view class=‘detail-item-text’>

<text>类型/品牌/型号: {{item.order_type}}/{{item.order_brand}}/{{item.device_model}} </text>

</view>

</view>

</block>

</block>

<view wx:if=’{{show_bottom}}’ class=‘detail-bottom’>触底啦~</view>

<view class=‘bottom-button’ hidden=’{{selectedTab}}’><button  id=‘1’  bindtap=‘switchTab’></button></view>

</scroll-view>

</swiper-item>

<swiper-item>

<map id=‘lonely-map’ bindmarkertap=‘updateMarkers’ bindtap=‘updateRegion’ class=‘map’ markers=’{{markers}}’ scale=‘13’ show-location=‘true’ longitude=’{{location.longitude}}’ latitude=’{{location.latitude}}’></map>

<view class=‘bottom-button’ hidden=’{{!selectedTab}}’><button id=‘0’  bindtap=‘switchTab’></button></view>

</swiper-item>

</swiper>

没有人会再看这个问题了?

请问有人解答吗?是不是bug,给个准信也可以。

那因为地图永远是在最顶层,不能改的,我也是因为这个问题找了好多的绝佳方案

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码示例。

回到顶部