问题
我使用react-native-map库在Google地图上有几个地图标记。
我的问题是,当地图上有 2个或更多标记时,它们的边框会显得模糊,以低/中缩放级别显示,并带有奇怪的黑色像素(屏幕A)。
可能的线索
放大两个标记之一时,奇怪的黑色像素消失(屏幕B)。
使用一个标记根本没问题(屏幕C)。
使用红色,黑色,紫色等较深的颜色时没有问题...但是白色,黄色和其他浅色问题仍然存在。
我也在iphone 5、6和7(设备)上进行了测试,并且仅在iphone 7上出现过。可能与设备分辨率有关吗?
我暂时在android上没有发现任何问题。
SPECS(package.json)
"react": "16.2.0",
"react-native": "0.53.3",
"react-native-maps": "git+https://github.com/react-community/react-native-maps.git",
MARKER
<Marker
key={`${singleEvent.uid}${Date.now()}`}
coordinate={eventInfos.coordinates}
>
<View style={bigProfileImage}>
<UserPhoto
imageStyle={bigMarker}
img={img}
>
Thomas
</UserPhoto>
</View>
<View style={iconStyle}>
<Image
resizeMode={'cover'}
resizeMethode={'resize'}
style={{ width: 22, height: 22 }}
source={sample}/>
</View>
<Callout tooltip />
</Marker>
样式
const border = {
borderWidth: 2,
borderColor: HEXCOLOR.pureWhite,
justifyContent: 'center',
alignItems: 'center',
overflow: 'hidden',
}
[...]
bigProfileImage: {
width: 72,
height: 72,
borderRadius: 36
},
bigMarker: {
...border,
borderWidth: 4,
borderRadius: 39,
height: 78,
width: 78,
},
附着的屏幕