[OpenLayers-Users] How to Create buffer around point?
Christian Mayer
mayer at terrestris.de
Mon Jan 30 09:47:10 EST 2012
Hi,
you can do this with OpenLayers as well.
To get a clicked position use something like this:
http://openlayers.org/dev/examples/click.html
To render a circle buffer around the clicked position use this function:
http://dev.openlayers.org/docs/files/OpenLayers/Geometry/Polygon-js.html#OpenLayers.Geometry.Polygon.createRegularPolygon
Best regards,
Chris
On 30.01.2012 09:57, Raymond Nijssen wrote:
> Try JSTS. It integrates very well with OpenLayers and contains the
> Buffer-function client side in javascript. That means it works on
> features in a vector-layer. I'm not sure if that is what you're
> looking for though.
>
> https://github.com/bjornharrtell/jsts
>
> Good luck!
>
> Raymond
>
>
>
> On 01/30/2012 09:06 AM, Robert Buckley wrote:
>> Hi,
>>
>> I need to implement a "simple" buffer tool. The tool should simply
>> place a Buffer zone around the position clicked in the map when the
>> tool is activated.
>>
>> ...the tool should work like this...
>>
>> 1. Activate tool in toolbar
>> 2. Set Radius in map units
>> 3. Click in map
>> 4. buffer polygon based on the set radius is created and rendered in
>> the map
>>
>>
>>
>> My system is Geoserver 2.1.2 / Postgis 1.5
>>
>> I have done this with an sld and also in postgis ...but I really need
>> the real-time effect in the map!
>>
>> any help or examples would be great,
>>
>> yours,
>>
>> Robert
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
> --
> Terglobo
> Ampèrestraat 110
> 5223 CT 's-Hertogenbosch
> 06-25314983
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120130/f6a17704/attachment.html
More information about the Users
mailing list