[OpenLayers-Users] kml.write and styles

Vidal, Antoni antoni.vidal at icc.cat
Fri Apr 3 03:54:36 EDT 2009


Hello,

 

I'm trying to export to kml, features drawned by user using EditingToolbar, but the kml created doesn't contains any style information and it's represented over GE as a white line.

 

A part of the code is:

 

                ........

                case "LINESTRING":       

                               var lstr = new OpenLayers.Geometry.LineString(TransformedCoordinates);

                               var stlFeature = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style["default"]);

                               featuresKML[i] = new OpenLayers.Feature.Vector(lstr, null, stlFeature);

                break;

                ........

                

                var kmlout = new OpenLayers.Format.KML();

                this.kml = kmlout.write(featuresKML);

 

Any idea?

 

Thank's in advance.

 

Antoni Vidal

Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392> 
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat/vissir2 <http://www.icc.cat/vissir2> 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090403/822a16b9/attachment.html


More information about the Users mailing list