title: Read Multipolygon geoJson data and display on Leaflet map
body: <p>I would like to read/display geoJson data on a Leaflet map. I have 10 multipolygons stored in the geoJson file and would like to color each in a different color. </p>
  
  <p>Reading the documentation on Leaflet's <a href="http://leafletjs.com/examples/geojson/" rel="nofollow noreferrer">website</a>, I used the following code to read and color the polygons:</p>
  
  <pre><code>//Adding multipolygons to map
  L.geoJSON(dataName, {
      style: function(feature) {
          switch (feature.properties.id) {
              case '100': return {color: "#ff0000"};
              case '200':   return {color: "#0ff000"};
          ...
          case '1000':   return {color: "#0000ff"};
          }
      }
  }).addTo(map);
  </code></pre>
  
  <p>And this is the datafile:</p>
  
  <pre><code>//Data file
  var dataName = {"type": "FeatureCollection", "features":[
  
  { "type":"Feature","id":100,"properties":{"id":"100","count":0},"crs":{"type":"name","properties":{"name":"GEODATA"}},
  "geometry":{"type":"MultiPolygon","coordinates":[MANY COORDINATES]
  }},
  {"type":"Feature","id":200,"properties":{"id":"200","count":0},"crs":{"type":"name","properties":{"name":"GEODATA"}},
  "geometry":{"type":"MultiPolygon","coordinates":[MANY COORDINATES]
  }},
  
  ...
  
  {"type":"Feature","id":1000,"properties":{"id":"1000","count":0},"crs":{"type":"name","properties":{"name":"GEODATA"}},
  "geometry":{"type":"MultiPolygon","coordinates":[MANY COORDINATES]
  }]}
  </code></pre>
  
  <p>Nothing is displayed. I think the error lies inside the function. Not really sure what "feature" does. Any clues?</p>
  
  <p>Thx!</p>