react-nativedictionarystylingreact-native-mapbox-gl

react-native-mapbox-gl / maps how to change styles?


I see there layers in documentation. https://github.com/react-native-mapbox-gl/maps#layers But I can't understand how I can change color of buildings and roads. And how to change text in labels. And fontsize. Please help. My task is to do contrast white-black map.


Solution

  • you can design your map at https://studio.mapbox.com/. When you publish a map, you will get a style url

    Then you can add to style url to your map like this:

    <MapboxGL.MapView
      styleURL="mapbox://styles/tijsmartens/ckjr7xuda2j0k19pjmx8hczud"
    />