The following KML render polygons from two groups.
The larger polygon and small polygon should render on top of the green
midsize one.
This example show that small one is rendering under the midsize one.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="
http://earth.google.com/kml/2.2">
<Document>
<name>test.kml</name>
<Style id="sh_ylw-pushpin_copy5">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>
http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</
href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
<LineStyle>
<color>ff00ffaa</color>
</LineStyle>
<PolyStyle>
<color>ff00ffaa</color>
</PolyStyle>
</Style>
<Style id="sh_ylw-pushpin_copy0">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>
http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</
href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
<LineStyle>
<color>ff00aaff</color>
</LineStyle>
<PolyStyle>
<color>ff7faaff</color>
</PolyStyle>
</Style>
<Style id="sn_ylw-pushpin_copy5">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>
http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</
href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" units="pixels"/>
</IconStyle>
<LineStyle>
<color>ff00ffaa</color>
</LineStyle>
<PolyStyle>
<color>ff00ffaa</color>
</PolyStyle>
</Style>
<StyleMap id="msn_ylw-pushpin_copy0">
<Pair>
<key>normal</key>
<styleUrl>#sn_ylw-pushpin_copy0</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#sh_ylw-pushpin_copy0</styleUrl>
</Pair>
</StyleMap>
<StyleMap id="msn_ylw-pushpin_copy4">
<Pair>
<key>normal</key>
<styleUrl>#sn_ylw-pushpin_copy4</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#sh_ylw-pushpin_copy4</styleUrl>
</Pair>
</StyleMap>
<Style id="sn_ylw-pushpin_copy0">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>
http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</
href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" units="pixels"/>
</IconStyle>
<LineStyle>
<color>ff00aaff</color>
</LineStyle>
<PolyStyle>
<color>ff7faaff</color>
</PolyStyle>
</Style>
<StyleMap id="msn_ylw-pushpin_copy5">
<Pair>
<key>normal</key>
<styleUrl>#sn_ylw-pushpin_copy5</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#sh_ylw-pushpin_copy5</styleUrl>
</Pair>
</StyleMap>
<Style id="sh_ylw-pushpin_copy4">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>
http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</
href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
<LineStyle>
<color>ff00aaff</color>
</LineStyle>
<PolyStyle>
<color>ff7faaff</color>
</PolyStyle>
</Style>
<Style id="sn_ylw-pushpin_copy4">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>
http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</
href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
<LineStyle>
<color>ff00aaff</color>
</LineStyle>
<PolyStyle>
<color>ff7faaff</color>
</PolyStyle>
</Style>
<Folder>
<name>test</name>
<open>1</open>
<Folder>
<name>top</name>
<Placemark>
<name>larger</name>
<styleUrl>#msn_ylw-pushpin_copy0</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-118.1404846539799,48.54718939016117,0
-118.1349135367779,48.46900320048199,0
-118.0456331121671,48.47411450807715,0
-118.0592792034245,48.552268041792,0
-118.1404846539799,48.54718939016117,0 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>small szie</name>
<styleUrl>#msn_ylw-pushpin_copy4</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-118.0294694800251,48.51512164127791,0
-118.0281738079975,48.50406277474957,0
-118.0208705034375,48.50457827983837,0
-118.0247738655308,48.51512002385941,0
-118.0294694800251,48.51512164127791,0 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</Folder>
<Folder>
<name>bottom</name>
<Placemark>
<name>midsize</name>
<styleUrl>#msn_ylw-pushpin_copy5</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-118.0685991966032,48.52783804577032,0
-118.0643364242297,48.48889685074179,0
-118.0127859932157,48.48845296831494,0
-118.0279854182784,48.52936295765097,0
-118.0685991966032,48.52783804577032,0 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</Folder>
</Folder>
</Document>
</kml>