同一份代码打包了android和ios,map中的polygons多边形围起来的区域ios是黑色的,android是正常的。用的是vue。
<map id="map" :latitude="latitude" :longitude="longitude" :polyline="polylines" :polygons="coords"
@markertap='markertap' @callouttap='callouttap' :markers="markerList" :scale="scale" show-location="true"
:style="{height: mapHeight + 'px', width: mapWidth + 'px'}">
<cover-view style="float:right;display:fixed;right:-650rpx;">
<cover-view class="b" style="background-color: #fff;width: 60rpx; height: 60rpx;">
<cover-image src="../../static/image/mylocation.png" style="width: 60rpx; height: 60rpx;"
mode="aspectFit" @click.stop="getLocalData()">
</cover-image>
</cover-view>
</cover-view>
<!-- 自定义窗口 -->
<cover-view slot="callout">
<template v-for="(item,index) in markerList">
<cover-view :marker-id="item.id" :key='index'>
<cover-view class="position-relative" style="width: 92rpx; height: 78rpx;">
<cover-image class="position-absolute" style="width: 92rpx; height: 78rpx;"
src="../../static/meun/jinggao.png"></cover-image>
<cover-view style="top: 13rpx; left: 45rpx; width: 30rpx; height: 30rpx;"
class="border bg-white rounded-circle flex align-center justify-center position-absolute">
<cover-view>{{ item.type }}</cover-view>
</cover-view>
</cover-view>
</cover-view>
</template>
</cover-view>
</map>