Hello Yerry, You can do it by using a file with all the placemarks (having its own Vector layer). For every placemark you put the tracks into another file and access it through a different Vector layer. P.S Use extractTracks: true if you want the track. --- On Wed, 4/20/11, Yerry <[email protected]> wrote:
From: Yerry <[email protected]> Subject: [OpenLayers-Users] Reading KML file into multiple layers To: [email protected] Date: Wednesday, April 20, 2011, 11:22 PM Hello, I have KML files with multiple tracks and multiple placemarks. I would like to have each track in a seperate layer and a seperate layer for all placemarks. Currently I use the following code: layer = new OpenLayers.Layer.Vector("All", { projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: KML_FILE, format: new OpenLayers.Format.KML({ extractStyles: true, extractAttributes: true }), }), }); -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Reading-KML-file-into-multiple-layers-tp6293353p6293353.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
