Custom icons for KML file
HI All, I'm playing with the maps API and I'm trying to get some custom icons displayed when parsing a KML file.
I tried setting Styles in the KML file but somehow they will not parse correctly.
Does anybody has an example KML file with custom icons that works correctly with the KML pareser?
Or does someone has an other solution?
Thanks,
JWB
Re: Custom icons for KML file
The English Premiership Football example: [URL="http://www.developer.nokia.com/Community/Wiki/Nokia_Maps_API_-_Converting_from_JavaScript_to_KML"]here[/URL] uses [B]<Style> [/B]and [B]<IconStyle>[/B] as well as inline styles.
You want something like:
[CODE]
<Style id='LINKED_STYLE_ID'>
<IconStyle><Icon><href>URL GOES HERE ....</href></Icon>
<hotSpot x="16" y="32" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<Placemark>
<name>Name</name>
<description><![CDATA[<div >HTML Description</div>]]></description>
<Point><coordinates>-2.96632468700409,53.438828522666,0</coordinates></Point>
<styleUrl>#LINKED_STYLE_ID</styleUrl>
</Placemark>
[/CODE]
The HTML and JavaScript are basically a copy of the [URL="http://api.maps.nokia.com/en/playground/examples/maps/kml/kmlfile.html"]Playground Example[/URL]