Hi, the heading is currently only parsed when they are inside a gx:track.
Andreas. On Oct 30, 2011, at 20:40 , Tobias Reinicke wrote: > Hi Andreas, > > Thanks for that. I had seen the example and had already tried that, > however my KML file does not have any <gx:track> elements in it, just > the heading in the <points> tag > i.e. ...<IconStyle><scale>0.8</scale><heading>26</heading><Icon>... > > If I try and specify extractTracks:true with the current KML file that > I am working with, no features are rendered at all. > A mockup of this is here: > http://defra.eodata.co.uk/toby/demos/wgs84/googlebasetest.html > > with 2 layers, first one is with extractTracks:true, second one is false... > > Any thoughts would be much appreciated. > > I do have quite a bit of control how the kml is created, so if I have > to wrap the <heading> tag in a <gx:track> then fine, but I'd rather > see if this could work first.. > > Failing that I should just call these back as json... > > Thanks a lot, > > Toby > > > > > > > On 29 October 2011 11:37, Andreas Hocevar <[email protected]> wrote: >> Hi, >> >> for KML tracks, your features get populated with a heading attribute when >> you configure the KML format with >> >> extractTracks: true >> >> You can then use that attribute for a dynamic symbolizer in your StyleMap, >> e.g. with >> >> rotation: "${heading}", >> >> You may want to use the http://openlayers.org/dev/examples/kml-track.html >> example as a starting point. It has extractTacks option set to true already, >> and you only have to add the above rotation property to the StyleMap's >> "default" Style definition. >> >> Andreas. >> >> On Oct 28, 2011, at 15:17 , Tobias Reinicke wrote: >> >>> Hello All, >>> >>> I was wondering if it is a known limitation of OL that it doesn't read >>> the <heading> tag in a kml file... >>> >>> If you go here >>> http://openlayers.org/dev/examples/vector-formats.html >>> and select kml in the dropdown, and then paste the following: >>> <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>Aircraft >>> Tracking</name><Placemark >>> id="placemark400A52"><name>EZY2016</name><description>something</description><Style >>> id="sn_aircraft"><IconStyle><scale>0.8</scale><heading>26</heading><Icon><href>http://defra.eodata.co.uk/images/icons/aircraft_orange.png</href></Icon></IconStyle></Style><Point><extrude>1</extrude><altitudeMode>relativeToGround</altitudeMode><coordinates>-0.21255,51.61368,4900</coordinates></Point></Placemark> >>> >>> I would have thought that the icon should be rotated according to the >>> <heading> tag. >>> >>> Any thoughts would be much appreciated. >>> >>> Regards, >>> >>> Toby >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> >> >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
