react-native 地图自定义 css 或样式

react-native map customized css or style

有没有办法像使用常规 javascript 一样自定义 MapView?我想做一个这样的主题:file:///Users/robertkelly/Downloads/snazzy-maps-example-ultra-light-with-labels-style.html

而且我能够让它在原版中工作 javascript:http://jsbin.com/fodapo/edit?js,output

但似乎无法弄清楚如何在 React-Native 中实现这一点,因为没有标准的 google 地图 api 来向地图视图提供输入,例如:

[{"featureType":"water","elementType":"geometry","stylers":[{"color":"#e9e9e9"},{"lightness":17}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#f5f5f5"},{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#ffffff"},{"lightness":17}]}]

我不知道设置 RN 内置样式的方法 MapView yet, but I think the possibility to define a custom map style would be a nice feature and should maybe added to the react native productpains

与此同时,您应该看看 react-native-mapbox-gl component (android/ios). You can add a custom map style to react-native-mapbox-gl created using Mapbox Studio (examples)。