StyleUrl for GMUPlacemark not matching up with any GMUStyle within the _styles property of GMUGeometryRenderer.
I have found that when the below kml document is parsed by GMUKMLParser, the resulting GMUPlacemark object does not have a valid string within the StyleUrl property that references a GMUStyle object. Thus no style is applied to the given placemark despite being set and exported via Google Earth Pro desktop Mac app.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>KW Path.kml</name>
<Style id="sn_ylw-pushpin">
<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>ff00c2ff</color>
<width>2</width>
</LineStyle>
</Style>
<Style id="sh_ylw-pushpin">
<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>ff00c2ff</color>
<width>2</width>
</LineStyle>
</Style>
<StyleMap id="msn_ylw-pushpin">
<Pair>
<key>normal</key>
<styleUrl>#sn_ylw-pushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#sh_ylw-pushpin</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name>KW Path</name>
<styleUrl>#msn_ylw-pushpin</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
-95.40955451587095,29.68319223122121,0 -95.41162049810978,29.68311038759943,0
</coordinates>
</LineString>
</Placemark>
</Document>
</kml>
I am having same problem. It looks like GMUKMLParser is not properly parsing the Pair tag in StyleMap
https://github.com/googlemaps/google-maps-ios-utils/pull/228
Unfortunately I don't think your change fixes the problem. I've put the change into my code, and I still have issues with styling placemarks.
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.