title: react-native-maps custom map style
body: <p>I created a json using google maps styling wizard. I then set that to a const under render and set that const to my MapView style but it renderers nothing when I do.</p>
  <p>I am not sure the issue, Ideally I would like to have the style in a separate file but I was trying to start small.</p>
  <p><strong>How can I fix the current issue I am having as well as import and use the style from a separate file?</strong></p>
  <p>Here is a <a href="https://snack.expo.dev/@priedejm/custom-map-style" rel="nofollow noreferrer">snack of my code</a> that reproduces my exact error as well as the code below.</p>
  <pre><code>export default class Map extends React.Component {
  
   
    render() {
      const mapStyle = [
        {
          &quot;featureType&quot;: &quot;landscape.man_made&quot;,
          &quot;elementType&quot;: &quot;labels.icon&quot;,
          &quot;stylers&quot;: [
            {
              &quot;visibility&quot;: &quot;off&quot;
            }
          ]
        },
        {
          &quot;featureType&quot;: &quot;poi.attraction&quot;,
          &quot;elementType&quot;: &quot;labels.icon&quot;,
          &quot;stylers&quot;: [
            {
              &quot;visibility&quot;: &quot;off&quot;
            }
          ]
        },
        {
          &quot;featureType&quot;: &quot;poi.business&quot;,
          &quot;elementType&quot;: &quot;labels.icon&quot;,
          &quot;stylers&quot;: [
            {
              &quot;visibility&quot;: &quot;off&quot;
            }
          ]
        },
        {
          &quot;featureType&quot;: &quot;poi.business&quot;,
          &quot;elementType&quot;: &quot;labels.text&quot;,
          &quot;stylers&quot;: [
            {
              &quot;visibility&quot;: &quot;on&quot;
            }
          ]
        },
        {
          &quot;featureType&quot;: &quot;poi.government&quot;,
          &quot;elementType&quot;: &quot;labels.icon&quot;,
          &quot;stylers&quot;: [
            {
              &quot;visibility&quot;: &quot;off&quot;
            }
          ]
        }
      ]
  
      return (
       &lt;View style={{...StyleSheet.absoluteFillObject}}&gt;
        &lt;MapView
          style={mapStyle}
          provider={PROVIDER_GOOGLE}&gt;
        &lt;/MapView&gt;
  
        &lt;/View&gt;
      );
    }
  }
  
  </code></pre>