Dear Slawomir,
Try to use "http://kmlvalidator.com/"; in order to "strong" validate your kml
file.
Hope this help.
Regards,
Carlos

2010/5/7 Slawomir Messner <[email protected]>

>  Our Application uses OL to draw features on a map, style them and save it
> in postgresql(attributes and style as json strings). After that then we load
> them as KML-files. With polygons and linestrings there is no problem, but
> with points. When they are styled like below they are not drawn when we load
> them.
> Now I was looking for the reason and I found it, I think. It's when a point
> is styled not the default(or any other) value for pointRadius is used, am I
> right?
> If there is no failure in my style than my proposal is to add the following
> line into the parseFeature-function of OpenLayers.Format.KML, right before
> "var feature = new OpenLayers.Feature.Vector(geometry, attributes);":
>     if ((geometry instanceof OpenLayers.Geometry.Point || geometry
> instanceof OpenLayers.Geometry.MultiPoint) &&
> this.styles[attributes.styleUrl] &&
> !this.styles[attributes.styleUrl].pointRadius) {
>                 this.styles[attributes.styleUrl].pointRadius = 6;
>     }
> Or it could be a better solution to add the default as default to 6 in the
> parseStyle-function like(would save the if statement, but there would be
> more useless data in the style-objects):
>     style["pointRadius "] = 6;
> It's a pity that in the parseStyle there is no access to the geometries use
> the style, but it's clear why it's like that.
>
> <Style id="style16313">
>       <LineStyle>
>               <color>FF214365</color>
>               <width>1</width>
>       </LineStyle>
>       <PolyStyle>
>               <color>66563412</color>
>               <fill>1</fill>
>               <outline>1</outline>
>       </PolyStyle>
>       <LabelStyle></LabelStyle>
>       <IconStyle></IconStyle>
> </Style>
>
>
>
>
> --
> -----------------------------------------------
> Slawomir Messner
> Forschungszentrum "Deutscher Sprachatlas"
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to