[OpenLayers-Users] Drawing polygons
Erik Uzureau
erik.uzureau at metacarta.com
Wed Mar 14 12:40:56 EDT 2007
Just for the record, if anyone is interested in the Cavanas layer, it could be
adapted for use as one of the renderers in the new vector layer code.
There is a class called OpenLayers.Renderer (lib/OpenLayers/Renderer.js) which
gives a skeleton of the necessary functionalities. You just subclass that and
implement the draw/erase geometry functions, etc.
Erik
On 2/14/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Wed, Feb 14, 2007 at 10:00:20AM -0600, Jeff Dege wrote:
> > We have a need to draw polygons on a map. The idea is to allow the
> > users to interactively edit the boundaries of a number of field worker's
> > service areas. Driver X is responsible for work in area A, driver Y for
> > area B, etc. We need the users to be able to edit the boundaries of
> > these areas, represented as arbitrary polygons.
> >
> > The points will be stored in our own database, we're not writing shape
> > files.
> >
> > The question is, how do we do this in OpenLayers? I've been seeing
> > references to the vector layer - is this the sort of problem it is
> > intended for? Some time back, I saw references to a canvas layer. Has
> > that fallen by the wayside?
>
> The canvas layer was a proof of concept, that never really well
> supported this behavior. (in fact, I don't think I ever supported
> polygons with it.) The Vector branch, at
> http://svn.openlayers.org/sandbox/vector/ , is exactly suited for this,
> including storage to WFS backends, support for GML, etc. etc. etc.
>
> http://dev.openlayers.org/sandbox/vector/examples/EditingDemo.html is
> probably a decent example of the functionality in the Vector sandbox.
>
> Select the layer switcher, pick the radio button next to 'vector layer',
> click 'draw linearRing', then draw on the map.
>
> The timeline for inclusion of the vector sandbox into the core of
> OpenLayers is on the scale of 1-2 months.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
More information about the Users
mailing list