This object is in archive! 

KML IconStyle->heading doesn`t behave properly

elmuSSo shared this problem 10 years ago
Solved

Me again:)


I found another bug in KML behaviour. This time it is: . It`s normal function should be rotation of an icon(but it may also exists in other type placemarks). In Google Earth it works fine, the below code should rotate an "A" icon of 45 degrees to the right. In Locus it is rotating it, but also moving the icon to a different position. Especially interesting effect can be seen when the icon is shown, and then when screen is moving, the icon is moving fast horizontally or vertically. Interesting bug.


<?xml version="1.0" encoding="UTF-8"?>


<kml :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>KmlFile</name>


<Style id="aircraftStyle285">


<IconStyle id="aircraftIcon285">


<scale>1.2</scale>


<heading>45</heading>


<Icon>


<href>http://dummyimage.com/24x24/555/fff.png?text=A</href>;


</Icon>


</IconStyle>


</Style>


<Placemark id="1c2a789">


<name>EVA67 - 11|829</name>


<description><![CDATA[B77W: TPE->LHR]]></description>


<styleUrl>#aircraftStyle285</styleUrl>


<Point>


<extrude>1</extrude>


<altitudeMode>relativeToGround</altitudeMode>


<coordinates>14.1394,51.48149999999999,10965.18</coordinates>


</Point>


</Placemark>


</Document>


</kml>

Replies (2)

photo
0

nice floating `A` ... you may notice that it`s moving in wrong axis. When you move right, it move to top, when you move map down, it move left, etc :)


EDIT: hmm, incorrect order of transformations (rotate was by accident first). I`m sure it worked fine because I did improvements to geocaching icons. I had to change creating of transformation matrix and this is result. Thanks, problem fixed

photo
0

Ok. Please also test it a little bit, I didn`t do that properly, but I think I had a problem with using some angles. But I`m not sure it I`m right. Just please test 6 or 8 different angles (positive and negative) to be sure if they are fine.

Replies have been locked on this page!