AW: [OpenLayers-Users] drawing an ellipse

Arnd Wippermann arnd.wippermann at web.de
Thu Sep 29 13:19:19 EDT 2011


Hi,

perhaps the use of an externalGraphic will do the job. 

Change the select style in graphic-name.js of the OpenLayers example to see
the effect:

"select": {
    pointRadius: 20,
    externalGraphic:"img/check-round-green.png",
    graphicWidth:30,
    graphicHeight:20,
    fillOpacity: 1,
    rotation: 20
}

If you use a context you can change the width, height and rotation due to
some attributes of your features.

Arnd


-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Mr. Puneet
Kishor
Gesendet: Donnerstag, 29. September 2011 05:35
An: Andreas Hocevar
Cc: openlayers-users at lists.osgeo.org
Betreff: Re: [OpenLayers-Users] drawing an ellipse


On Sep 28, 2011, at 10:29 PM, Andreas Hocevar wrote:

> You may want to look at the
http://openlayers.org/dev/examples/regular-polygons.html example and the
RegularPolygon handler.
> 


I am actually looking at Renderer.SVG
[http://dev.openlayers.org/docs/files/OpenLayers/Renderer/SVG-js.html] and
Renderer.SVG2
[http://dev.openlayers.org/docs/files/OpenLayers/Renderer/SVG2-js.html] and
wondering if there is a chance with those. I am not familiar with the
innards of OL, so am not sure how a renderer relates to a layer. I don't see
any examples with SVG... did I overlook them?



> Note, however, that this is intended for interactive drawing of
(ir)regular polygons (an ellipse is just an irregular polygon with many
sides). But you could use the same technique for programmatic ellipse
generation.
> 
> Andreas.
> 
> On Sep 28, 2011, at 21:05 , Mr. Puneet Kishor wrote:
> 
>> Given a lng/lat, the semi-major-minor axes, and major axis rotation, I'd
like to draw an ellipse on my map. What are my options?
>> 
>> Many thanks in advance,
>> 
>> --
>> Puneet Kishor_______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> 
> 
> 
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> 

_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list