Reputation: 31
I'm using javascript API V3 for parsing several KML files for a long time without problem. Suddenly, without any changes to code or KML files, API started to ignore hotSpot tag in custom IconStyle and instead of using hotspot defined in IconStyle (center of custom icon), it using default icon hotspot (in the middle of bottom edge of icon). I temporary modified the icons, added a "stick" to center of bottom edge, but it's not the solution i would like ...
Any ideas ? Thanks.
<Style id="TO-PS-MAG">
<IconStyle>
<Icon>
<href>http://mapa.opevneni.cz/files/ICONS2/TO-PS-MAG.png</href>
</Icon>
<hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction" />
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
</Style>
live example - mapa.opevneni.cz
Upvotes: 3
Views: 589
Reputation: 161334
This is a (new) bug in the KML renderer. See: Issue 10773: Offset Markers in KML
A workaround (if your KML isn't too complex) would be to use a third party KML parser (like geoxml3 or geoxml-v3)
Upvotes: 4