hi, there you have the same problem: point-vectors stays as they are -without stretching/resizing.<div><br></div><div>i just find the solution:</div><div><br></div><div><div>          function createCircle(lat, lon, radius){</div>
<div>           polygonLayer.removeFeatures(polygonLayer.features);</div><div>                var style = {</div><div>                    fillColor: &#39;#ff0000&#39;,</div><div>                    strokeWidth: 1,</div><div>
                    pointRadius: radius,  // in map coordinates</div><div>                  </div><div>                };</div><div><br></div><div><br></div><div>               var point = new OpenLayers.Geometry.Point(lat, lon);</div>
<div>               var polygonFeature = OpenLayers.Geometry.Polygon.createRegularPolygon(point,radius,30,0);</div><div>               var feature = new OpenLayers.Feature.Vector(polygonFeature,null, style);  </div><div><br>
</div><div>  </div><div>                polygonLayer.addFeatures([feature]);</div><div>                polygonLayer.setOpacity(0.5);</div><div><br></div><div><br></div><div>            }</div><br><div class="gmail_quote">
2009/12/17 Ivan Grcic <span dir="ltr">&lt;<a href="mailto:igrcic@gmail.com">igrcic@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi, cant you make something like this:<br>

<a href="http://openlayers.org/dev/examples/styles-context.html" target="_blank">http://openlayers.org/dev/examples/styles-context.html</a><br>
<div><div></div><div class="h5"><br>
On Thu, Dec 17, 2009 at 10:34 AM, Mehmet Sirin &lt;<a href="mailto:m.sirin07@googlemail.com">m.sirin07@googlemail.com</a>&gt; wrote:<br>
&gt; hi,<br>
&gt; since there isn&#39;t a buffer function integrated in openlayers i have to find<br>
&gt; other ways to simulate buffering a point and displaying it:<br>
&gt;<br>
&gt;  function pointBuffer(lat, lon, radius,color){<br>
&gt;            polygonLayer.removeFeatures(polygonLayer.features);<br>
&gt;                 var style = {<br>
&gt;                     fillColor: &#39;#ff0000&#39;,<br>
&gt;                     strokeWidth: 1,<br>
&gt;                     pointRadius: radius,  // in pixels<br>
&gt;<br>
&gt;                 };<br>
&gt;<br>
&gt;<br>
&gt;                 var point = new OpenLayers.Geometry.Point(lat, lon);<br>
&gt;                 var feature = new OpenLayers.Feature.Vector(point,null,<br>
&gt; style);<br>
&gt;<br>
&gt;                 polygonLayer.addFeatures([feature]);<br>
&gt;                 polygonLayer.setOpacity(0.5);<br>
&gt;<br>
&gt;             }<br>
&gt;<br>
&gt; ---------------------------------------------------------------------------------------------------------------<br>
&gt; ...<br>
&gt;                                  var lonlat1=new<br>
&gt; OpenLayers.LonLat(parseInt(radius),0);<br>
&gt;                                  var lonlat2=new<br>
&gt; OpenLayers.LonLat(parseInt(radius*2),0);<br>
&gt;                                  var<br>
&gt; pixel1=map.getLayerPxFromLonLat(lonlat1);<br>
&gt;                                  var<br>
&gt; pixel2=map.getLayerPxFromLonLat(lonlat2);<br>
&gt;<br>
&gt;<br>
&gt;                                  var dist=<br>
&gt; Math.abs(parseInt(pixel2.x)-parseInt(pixel1.x));<br>
&gt;<br>
&gt;<br>
&gt;                                  createCircle(x,y,dist);<br>
&gt;<br>
&gt; --------------------------------------------------------------------------------------------------------------<br>
&gt; It works fine, but now the problem:<br>
&gt; When zooming in or out the point feature won&#39;t resize -that means it does<br>
&gt; not changes. the pixel size/radius is the same in every zoom level.<br>
&gt; for solving this, i thought of creating a linearring and then a polygon, of<br>
&gt; which i know that will automatically resize with zooming.<br>
&gt; i tried:<br>
&gt; var linearRing = new OpenLayers.Geometry.LinearRing(point); //just one point<br>
&gt; var polygonFeature = new OpenLayers.Feature.Vector(<br>
&gt;  new OpenLayers.Geometry.Polygon([linearRing]),null, style);<br>
&gt; but seems not to work..<br>
&gt;<br>
&gt;<br>
&gt; anybody can help?<br>
&gt;<br>
&gt; regards<br>
&gt; m.sirin<br>
</div></div>&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
<font color="#888888">Ivan Grcic<br>
</font></blockquote></div><br></div>