Dear Slawomir,<br>Try to use &quot;<a href="http://kmlvalidator.com/">http://kmlvalidator.com/</a>&quot; in order to &quot;strong&quot; validate your kml file.<br>Hope this help. <br>Regards,<br>Carlos<br><br><div class="gmail_quote">
2010/5/7 Slawomir Messner <span dir="ltr">&lt;<a href="mailto:slawomir.messner@staff.uni-marburg.de">slawomir.messner@staff.uni-marburg.de</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  
  

<div bgcolor="#ffffff" text="#000000">
<code></code>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. <br>
Now I was looking for the reason and I found it, I think. It&#39;s when a
point is styled not the default(or any other) value for pointRadius is
used, am I right?<br>
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 <br>
&quot;var feature = new OpenLayers.Feature.Vector(geometry, attributes);&quot;:<br>
    <font color="#3333ff">if ((geometry instanceof
OpenLayers.Geometry.Point || geometry instanceof
OpenLayers.Geometry.MultiPoint) &amp;&amp;
this.styles[attributes.styleUrl] &amp;&amp; 
!this.styles[attributes.styleUrl].pointRadius) {<br>
                this.styles[attributes.styleUrl].pointRadius = 6;<br>
    }</font><br>
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):<br>
    <font color="#3333ff">style[&quot;pointRadius &quot;] = 6;</font><br>
It&#39;s a pity that in the parseStyle there is no access to the geometries
use the style, but it&#39;s clear why it&#39;s like that.<br>
<pre><code>&lt;Style id=&quot;style16313&quot;&gt;
        &lt;LineStyle&gt;
                &lt;color&gt;FF214365&lt;/color&gt;
                &lt;width&gt;1&lt;/width&gt;
        &lt;/LineStyle&gt;
        &lt;PolyStyle</code><code>&gt;
                &lt;color&gt;66563412&lt;/color&gt;
                &lt;fill&gt;1&lt;/fill&gt;
                &lt;outline&gt;1&lt;/outline&gt;
        &lt;/PolyStyle&gt;
        &lt;LabelStyle&gt;&lt;/LabelStyle&gt;
        &lt;IconStyle</code><code>&gt;&lt;/IconStyle&gt;
&lt;/Style&gt;</code></pre>
<br>
<br>
<br>
<pre cols="72">-- 
-----------------------------------------------
Slawomir Messner
Forschungszentrum &quot;Deutscher Sprachatlas&quot;
</pre>
</div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>