[OpenLayers-Users] (no subject)

mario1982 at libero.it mario1982 at libero.it
Mon Aug 31 12:01:03 EDT 2009


Hi all,
I'm trying to export kml using 'write' function. The kml file is generated but it doesn't contains any style information (color, image etc.) and it's represented on Google Earth as a white line.
How can I put the style information in the file?



Here is just a part of my code:

var gml3 = new OpenLayers.Format.GML.v2(gmlOptionsIn4);

var provaLayerFeatures = new OpenLayers.Layer.Vector("provaLayerFeatures", {
isBaseLayer: false 
});

featuresExpKml = gml3.read(unescape(g.geometry));
					  		
for (var t=0; t<featuresExpKml.length;t++) {
					  						  			featuresExpKml[t].geometry.transform(srcProj, destProj);
					  					  					  		provaLayerFeatures.addFeatures(featuresExpKml);

g.geometryKml = escape(kmlout.write(provaLayerFeatures.features));
   							
					  		



Thanks for your help,
Mario




More information about the Users mailing list