I was wondering where I should insert visibility: false in the code snippet below, similar to the second code example:
var line_10 = new OpenLayers.Layer.GML("Line nr-10",
"lines/line_10.kml",
{
format: OpenLayers.Format.KML,
style: {strokeWidth: 4, strokeColor: "#f08080", fillOpacity: 1 },
projection: map.displayProjection
}
);
Second Code:
var linja4_2 = new OpenLayers.Layer.Vector("Line nr-4 stations", {
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "/data/linja-nr4.kml",
format: new OpenLayers.Format.KML({
extractStyles: true,
extractAttributes: true
})
}),
visibility: false
});