【发布时间】:2019-09-17 11:09:39
【问题描述】:
您好 - 我正在尝试向“react-native-map”添加按国家/地区视图,以便按国家/地区返回数据;而不是只有标记/自定义标记。有人知道这样做的方法吗?
上面的图片类似于我想要实现的,它使用了 mapbox,它在 ReactNative 上并不完全可用,除非从 Expo 中弹出。
我一直在寻找现有的瓷砖或预先形成的“形状”以覆盖在 react-native-maps 上。我为美国各州找到了一些,但没有为个别国家找到。使用谷歌作为“提供者”并拥有“customMapStyle”似乎也不能解决这个问题。
<MapView
provider={PROVIDER_GOOGLE}
customMapStyle={mapJson}
style={{
alignSelf: 'stretch',
height: '100%',
width: '100%',
justifyContent: 'center',
alignItems: 'center',
position: 'absolute',
top: 0,
}}
initialRegion={region}
>
【问题讨论】:
标签: react-native maps customization react-native-maps