title: Multiple style/PolyStyle tags in KML file
body: <p>Stackers..</p>
  
  <p>I currently seem to be having some trouble with applying styles to polygons in a KML file that I have created. </p>
  
  <p>Currently, I am only trying to style two states, two different colours (North and South Dakota). </p>
  
  <p>When I upload it to a KML validator such as feedvalidator dot org it tells me the file is valid and there is no errors. </p>
  
  <p>When I upload the file/code to a site where it will display the output on a map, I see what I expect. (image 1 below)</p>
  
  <p>The issue is when the file is uploaded to GoogleMaps, it only seems to honor the first style only! (image 2 below)</p>
  
  <p><strong>Below is a simplified version of my code.</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;kml xmlns="http://www.opengis.net/kml/2.2"&gt;
  &lt;Document&gt;
      &lt;name&gt;&lt;![CDATA[Landgrab]]&gt;&lt;/name&gt;
      &lt;open&gt;1&lt;/open&gt;
      &lt;Style id="mowhawk"&gt;
          &lt;IconStyle&gt;
              &lt;scale&gt;1&lt;/scale&gt;
              &lt;Icon&gt;
                  &lt;href&gt;http://www.thefairtradepractice.co.uk/sites/default/files/mowhawk-logo-gmap-pin.png&lt;/href&gt;
              &lt;/Icon&gt;
          &lt;/IconStyle&gt;
          &lt;LabelStyle&gt;
              &lt;color&gt;8072000B&lt;/color&gt;
              &lt;scale&gt;1&lt;/scale&gt;
          &lt;/LabelStyle&gt;
          &lt;LineStyle&gt;
              &lt;color&gt;8072000B&lt;/color&gt;
              &lt;width&gt;2&lt;/width&gt;
          &lt;/LineStyle&gt;
          &lt;PolyStyle&gt;
              &lt;color&gt;8072000B&lt;/color&gt;
              &lt;fill&gt;1&lt;/fill&gt;
              &lt;outline&gt;1&lt;/outline&gt;
          &lt;/PolyStyle&gt;
      &lt;/Style&gt;
  
      &lt;Style id="sioux"&gt;
          &lt;IconStyle&gt;
              &lt;scale&gt;1&lt;/scale&gt;
              &lt;Icon&gt;
                  &lt;href&gt;http://www.thefairtradepractice.co.uk/sites/default/files/sioux-logo-gmap-pin.png&lt;/href&gt;
              &lt;/Icon&gt;
          &lt;/IconStyle&gt;
          &lt;LabelStyle&gt;
              &lt;color&gt;8000FFFF&lt;/color&gt;
              &lt;scale&gt;1&lt;/scale&gt;
          &lt;/LabelStyle&gt;
          &lt;LineStyle&gt;
              &lt;color&gt;8000FFFF&lt;/color&gt;
              &lt;width&gt;2&lt;/width&gt;
          &lt;/LineStyle&gt;
          &lt;PolyStyle&gt;
              &lt;color&gt;8000FFFF&lt;/color&gt;
              &lt;fill&gt;1&lt;/fill&gt;
              &lt;outline&gt;1&lt;/outline&gt;
          &lt;/PolyStyle&gt;
      &lt;/Style&gt;
  
  &lt;!--
  #############################
      NORTH DAKOTA STATE
  #############################
  --&gt; 
  
  &lt;Placemark id="pm255"&gt;
      &lt;name&gt;&lt;![CDATA[North Dakota]]&gt;&lt;/name&gt;
      &lt;Snippet maxLines="0"&gt;empty&lt;/Snippet&gt;
      &lt;description&gt;&lt;![CDATA[]]&gt;&lt;/description&gt;
      &lt;styleUrl&gt;#mowhawk&lt;/styleUrl&gt;
      &lt;MultiGeometry&gt;
          &lt;Point id="g883"&gt;
              &lt;altitudeMode&gt;clampToGround&lt;/altitudeMode&gt;
              &lt;coordinates&gt;
                  *****LIST OF CO-ORDINATES*****
              &lt;/coordinates&gt;
          &lt;/Point&gt;
          &lt;Polygon id="g884"&gt;
              &lt;altitudeMode&gt;clampToGround&lt;/altitudeMode&gt;
              &lt;outerBoundaryIs&gt;
                  &lt;LinearRing&gt;
                      &lt;coordinates&gt;
                          *****LIST OF CO-ORDINATES*****
                      &lt;/coordinates&gt;
                  &lt;/LinearRing&gt;
              &lt;/outerBoundaryIs&gt;
          &lt;/Polygon&gt;
      &lt;/MultiGeometry&gt;
  &lt;/Placemark&gt;
  
  &lt;!--
  #############################
      SOUTH DAKOTA STATE
  #############################
  --&gt; 
  
  &lt;Placemark id="pm256"&gt;
      &lt;name&gt;&lt;![CDATA[South Dakota]]&gt;&lt;/name&gt;
      &lt;Snippet maxLines="0"&gt;empty&lt;/Snippet&gt;
      &lt;description&gt;&lt;![CDATA[]]&gt;&lt;/description&gt;
      &lt;styleUrl&gt;#sioux&lt;/styleUrl&gt;
      &lt;MultiGeometry&gt;
          &lt;Point id="g885"&gt;
              &lt;altitudeMode&gt;clampToGround&lt;/altitudeMode&gt;
              &lt;coordinates&gt;
                  *****LIST OF CO-ORDINATES*****
              &lt;/coordinates&gt;
          &lt;/Point&gt;
          &lt;Polygon id="g886"&gt;
              &lt;altitudeMode&gt;clampToGround&lt;/altitudeMode&gt;
              &lt;outerBoundaryIs&gt;
                  &lt;LinearRing&gt;
                      &lt;coordinates&gt;
                          *****LIST OF CO-ORDINATES*****
                      &lt;/coordinates&gt;
                  &lt;/LinearRing&gt;
              &lt;/outerBoundaryIs&gt;
          &lt;/Polygon&gt;
      &lt;/MultiGeometry&gt;
  &lt;/Placemark&gt;
  
  &lt;/Document&gt;
  &lt;/kml&gt;
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/ylvLd.png" rel="nofollow">Expected Results</a></p>
  
  <p><a href="http://i.stack.imgur.com/ZnaG5.png" rel="nofollow">Actual Results</a></p>
  
  <p>As can be seen from the above screen shots, when I put the KML into GoogleMaps, it doesn't seem to pick up any of the styles except for the first one. </p>
  
  <p><strong>Sites I used to check the output;</strong></p>
  
  <ul>
  <li>display-kml.appspot.com/</li>
  <li>elsevier-apps.sciverse.com/GoogleMaps/verification</li>
  </ul>
  
  <p>Thanks in advance for any help! </p>