iPhone 7-react-native-maps标记上的边框模糊/像素化

时间:2018-08-30 16:25:37

标签: ios google-maps react-native google-maps-markers react-native-maps

问题

我使用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,
  },

附着的屏幕

屏幕A-2个标记-中等缩放 Screen A - 2 markers - medium zoom

屏幕B-2个标记-高倍缩放 enter image description here

屏幕C-1个标记-中等缩放 enter image description here

0 个答案:

没有答案