<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hello Yerry,</DIV>
<DIV>You can do it by using a file with all the placemarks (having its own Vector layer).</DIV>
<DIV>For every placemark you put the tracks into another file and access it through a different Vector layer.</DIV>
<DIV>&nbsp;</DIV>
<DIV>P.S Use extractTracks: true if you want the track.</DIV>
<DIV>--- On <B>Wed, 4/20/11, Yerry <I>&lt;yerry@gmx.net&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>From: Yerry &lt;yerry@gmx.net&gt;<BR>Subject: [OpenLayers-Users] Reading KML file into multiple layers<BR>To: users@openlayers.org<BR>Date: Wednesday, April 20, 2011, 11:22 PM<BR><BR>
<DIV class=plainMail>Hello,<BR><BR>I have KML files with multiple tracks and multiple placemarks.<BR><BR>I would like to have each track in a seperate layer<BR>and a seperate layer for all placemarks.<BR><BR>Currently I use the following code:<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;layer = new OpenLayers.Layer.Vector("All", {<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; projection: map.displayProjection,<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strategies: [new OpenLayers.Strategy.Fixed()],<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; protocol: new OpenLayers.Protocol.HTTP({<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url: KML_FILE,<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; format: new OpenLayers.Format.KML({<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extractStyles: true,<BR>&nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extractAttributes: true<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }),&nbsp;&nbsp;&nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }),<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });<BR><BR>--<BR>View this message in context: <A href="http://osgeo-org.1803224.n2.nabble.com/Reading-KML-file-into-multiple-layers-tp6293353p6293353.html" target=_blank>http://osgeo-org.1803224.n2.nabble.com/Reading-KML-file-into-multiple-layers-tp6293353p6293353.html</A><BR>Sent from the OpenLayers Users mailing list archive at Nabble.com.<BR>_______________________________________________<BR>Users mailing list<BR><A href="http://us.mc1126.mail.yahoo.com/mc/compose?to=Users@lists.osgeo.org" ymailto="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</A><BR><A href="http://lists.osgeo.org/mailman/listinfo/openlayers-users"
 target=_blank>http://lists.osgeo.org/mailman/listinfo/openlayers-users</A><BR></DIV></BLOCKQUOTE></td></tr></table>