<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><HEAD><TITLE>Re: [OpenLayers-Users] Circles</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=677015719-08122008><FONT face=Arial 
color=#0000ff size=2>I would also consider, that to work with arc and circles in 
gis application would disable to reproject to another projection (how to convert 
a circle to the right ellipse and so on). I would think, this is the reason for 
gis formats not have the feature circle or arc. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=677015719-08122008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=677015719-08122008><FONT face=Arial 
color=#0000ff size=2>Arnd Wippermann</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=677015719-08122008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>Von:</B> 
users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] <B>Im Auftrag 
von </B>Heidt, Christopher M.<BR><B>Gesendet:</B> Montag, 8. Dezember 2008 
19:46<BR><B>An:</B> users@openlayers.org<BR><B>Betreff:</B> Re: 
[OpenLayers-Users] Circles<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=idOWAReplyText43258 dir=ltr>
<DIV dir=ltr><FONT color=#000000></FONT><FONT face=Arial size=2>this is 
definitly a clever aproach, but it is still a work-around for what i consider to 
be a basic shape.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>I just wonder why i cant have something 
along the lines of: new 
Openlayers.Geometry.Circle(lon,lat,radius);</FONT><BR></DIV>
<DIV dir=ltr>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr><FONT face=Tahoma size=2><B>From:</B> Estanislao Gonzalez 
[mailto:estanislao.gonzalez@isst.fraunhofer.de]<BR><B>Sent:</B> Mon 12/8/2008 
11:47 AM<BR><B>To:</B> Heidt, Christopher M.<BR><B>Subject:</B> Re: 
[OpenLayers-Users] Circles<BR></FONT><BR></DIV></DIV>
<DIV>
<P><FONT size=2>That's not true. You can always recalculate the circle radius 
when<BR>changing the zoom. That's what I did and had no problem at 
all.<BR><BR>//radius unit is in kilometers<BR>var DOTS_PER_UNIT = 
OpenLayers.INCHES_PER_UNIT.km *<BR>OpenLayers.DOTS_PER_INCH;<BR><BR>// 5 km 
radius<BR>var circleRadius = 5;<BR><BR>"default": new 
OpenLayers.Style({<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
pointRadius: "${radius}"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; context: 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
radius: 
function(feature){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//very rough. Be sure it is at least somehow 
correct.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
var rad = circleRadius * DOTS_PER_UNIT 
/<BR>feature.layer.map.getScale();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return 
rad;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
});<BR><BR>Still I didn't check if the measurement is right, but it is constant. 
So<BR>you might have to multiply it by a constant if required (probably 
by<BR>adapting DOTS_PER_UNIT).<BR><BR>Note that I'm reading the radius from a 
feature in a WFS layer, so you<BR>might have to change that as well 
(feature.attributes.radius)<BR><BR>Hope it 
helps,<BR><BR>Regards,<BR>Estani<BR><BR>Heidt, Christopher M. schrieb:<BR>&gt; 
right, changing a points radius in the style makes the marker that represents a 
point larger, but it isnt a "Circle" Feature because it remains the same size 
when u zoom in and out.<BR>&gt;<BR>&gt; oracle has a WKT outputer that makes a 
CURVEPOLYGON(# #,# #,# #,# #) or some such nonsence to represent circles. the 
problem is that it isnt part of the WKT spec so nothing supports 
it.<BR>&gt;<BR>&gt; I'd change it to a format that is supported,<BR>&gt; but i 
can't find anything in any format that can represent a circle.<BR>&gt; Anybody 
know if it would be a daunting task to add CURVEPOLYGON support to the WKT 
parser?<BR>&gt;<BR>&gt; ________________________________<BR>&gt; From: 
users-bounces@openlayers.org on behalf of Lehtonen, Mika<BR>&gt; Sent: Tue 
12/2/2008 2:23 PM<BR>&gt; To: Didrik Pinte<BR>&gt; Cc: 
users@openlayers.org<BR>&gt; Subject: Re: [OpenLayers-Users] 
Circles<BR>&gt;<BR>&gt;<BR>&gt; Hi Didrik,<BR>&gt;<BR>&gt; I guess the points 
are still points regardless of their style? So you<BR>&gt; can't use their 
geometry as a replacement of a circle?<BR>&gt;<BR>&gt; - mika -<BR>&gt;<BR>&gt; 
Didrik Pinte kirjoitti:<BR>&gt;&nbsp;&nbsp;<BR>&gt;&gt; On Tue, 2008-12-02 at 
08:27 -0500, Heidt, Christopher M. 
wrote:<BR>&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&gt;&gt;&gt; Probably 
a dumb question, but how can I create a circle feature using<BR>&gt;&gt;&gt; the 
api?<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; I'm hoping you're not going to say I have 
to generate a bunch of<BR>&gt;&gt;&gt; points an make a polygon 
:(<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&gt;&gt; 
Using a point with a style using a radius will do it 
fine.<BR>&gt;&gt;<BR>&gt;&gt; For example :<BR>&gt;&gt; <A 
href="http://openlayers.org/dev/examples/stylemap.html">http://openlayers.org/dev/examples/stylemap.html</A><BR>&gt;&gt;<BR>&gt;&gt; 
Didrik<BR>&gt;&gt;<BR>&gt;&gt; 
------------------------------------------------------------------------<BR>&gt;&gt;<BR>&gt;&gt; 
_______________________________________________<BR>&gt;&gt; Users mailing 
list<BR>&gt;&gt; Users@openlayers.org<BR>&gt;&gt; <A 
href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&gt; 
_______________________________________________<BR>&gt; Users mailing 
list<BR>&gt; Users@openlayers.org<BR>&gt; <A 
href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>&gt;<BR>&gt;&nbsp;&nbsp;<BR><BR><BR>--<BR>Dipl.-Kfm. 
Estanislao Gonzalez, Fraunhofer-Institut für Software- und Systemtechnik 
ISST<BR>Location-based Services, Steinplatz 2, 10623 Berlin, Germany<BR>Telefon: 
+49 (0) 30 / 2 43 06-3 36<BR><A 
href="mailto:estanislao.gonzalez@isst.fraunhofer.de">mailto:estanislao.gonzalez@isst.fraunhofer.de</A><BR>www.isst.fraunhofer.de<BR><BR></FONT></P></DIV></BODY></HTML>