Setting different fill colors for geoJSON objects in Google Maps API
<p>I created a map that has a data layer of geoJSON polygons on it. I have successfully set the fill color using maps.data.SetStyle. Now I want to create a different style for a certain set of polygons that I can identify through unique identifiers. </p>

<p>The Google maps documentation uses .getProperty() but when I loop through the json object that created the data layer I am thrown ane error. </p>

<p>Function is below:</p>

<pre><code>  map.data.setStyle(function(jsonData){
    for(var i = 0; i &lt;= 516; i++){
      var SD_NAME =jsonData.features[i].getProperty('properties.SD_NAME');

    return{
      fillColor: 'green',
      strokeWeight: 1
      }
    }      
  });
</code></pre>

<p>Error Message:
Uncaught TypeError: Cannot read property '0' of undefined</p>