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. Arnd Wippermann _____
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Heidt, Christopher M. Gesendet: Montag, 8. Dezember 2008 19:46 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] Circles this is definitly a clever aproach, but it is still a work-around for what i consider to be a basic shape. I just wonder why i cant have something along the lines of: new Openlayers.Geometry.Circle(lon,lat,radius); _____ From: Estanislao Gonzalez [mailto:[EMAIL PROTECTED] Sent: Mon 12/8/2008 11:47 AM To: Heidt, Christopher M. Subject: Re: [OpenLayers-Users] Circles That's not true. You can always recalculate the circle radius when changing the zoom. That's what I did and had no problem at all. //radius unit is in kilometers var DOTS_PER_UNIT = OpenLayers.INCHES_PER_UNIT.km * OpenLayers.DOTS_PER_INCH; // 5 km radius var circleRadius = 5; "default": new OpenLayers.Style({ pointRadius: "${radius}" }, { context: { radius: function(feature){ //very rough. Be sure it is at least somehow correct. var rad = circleRadius * DOTS_PER_UNIT / feature.layer.map.getScale(); return rad; } } }); Still I didn't check if the measurement is right, but it is constant. So you might have to multiply it by a constant if required (probably by adapting DOTS_PER_UNIT). Note that I'm reading the radius from a feature in a WFS layer, so you might have to change that as well (feature.attributes.radius) Hope it helps, Regards, Estani Heidt, Christopher M. schrieb: > 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. > > 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. > > I'd change it to a format that is supported, > but i can't find anything in any format that can represent a circle. > Anybody know if it would be a daunting task to add CURVEPOLYGON support to the WKT parser? > > ________________________________ > From: [EMAIL PROTECTED] on behalf of Lehtonen, Mika > Sent: Tue 12/2/2008 2:23 PM > To: Didrik Pinte > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Circles > > > Hi Didrik, > > I guess the points are still points regardless of their style? So you > can't use their geometry as a replacement of a circle? > > - mika - > > Didrik Pinte kirjoitti: > >> On Tue, 2008-12-02 at 08:27 -0500, Heidt, Christopher M. wrote: >> >> >>> Probably a dumb question, but how can I create a circle feature using >>> the api? >>> >>> I'm hoping you're not going to say I have to generate a bunch of >>> points an make a polygon :( >>> >>> >> Using a point with a style using a radius will do it fine. >> >> For example : >> http://openlayers.org/dev/examples/stylemap.html >> >> Didrik >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Dipl.-Kfm. Estanislao Gonzalez, Fraunhofer-Institut für Software- und Systemtechnik ISST Location-based Services, Steinplatz 2, 10623 Berlin, Germany Telefon: +49 (0) 30 / 2 43 06-3 36 mailto:[EMAIL PROTECTED] www.isst.fraunhofer.de
_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users