1. Set the visibility of the layer to false before adding to the map.

layers[i].setVisibility(false);
map.addLayer (layers[i]); 

2. This example may help
http://dev.openlayers.org/releases/OpenLayers-2.10/examples/vector-formats.h
tml


Arnd

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Wyo
Gesendet: Sonntag, 9. Januar 2011 13:48
An: [email protected]
Betreff: [OpenLayers-Users] Displaying relations and download as KML file

I've a web page which displays several relations. Is it possible to retrieve
the data and show them only when set visible in the layer switcher? How?

Is it possible to download a shown relation via a select feature box as a
KML file? Is there any sample code which I could change so the downloaded
KML is just a single way and not a relation of multiple ways anymore?

Wyo

_______________________________________________
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

Reply via email to