[OpenLayers-Users] File KML generated does not contains any style information

mario1982 at libero.it mario1982 at libero.it
Tue Sep 1 05:32:59 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

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users





More information about the Users mailing list