[OpenLayers-Dev] Re: Dev Digest, Vol 50, Issue 1

Matt Priour mpriour at kestrelcomputer.com
Mon Nov 1 12:15:36 EDT 2010


You just simply set the 'layer' property.

draw.layer = new_layer

Now the draw tool works against the new layer.

Matt Priour
Kestrel Computer Consulting

--------------------------------------------------
From: <openlayers-dev-request at lists.osgeo.org>
Sent: Monday, November 01, 2010 11:00 AM
To: <openlayers-dev at lists.osgeo.org>
Subject: Dev Digest, Vol 50, Issue 1

> Send Dev mailing list submissions to
> openlayers-dev at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
> or, via email, send a message with subject or body 'help' to
> openlayers-dev-request at lists.osgeo.org
>
> You can reach the person managing the list at
> openlayers-dev-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dev digest..."
>
>
> Today's Topics:
>
>   1. setLayer (Mohammed Rashad)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 1 Nov 2010 14:54:47 +0530
> From: Mohammed Rashad <mohammedrashadkm at gmail.com>
> Subject: [OpenLayers-Dev] setLayer
> To: openlayers-dev at lists.osgeo.org
> Message-ID:
> <AANLkTi=PbrAJv9a1+TguUN6h6rL8Yu5mt=n3B3H2j0kW at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> draw = new OpenLayers.Control.DrawFeature( wfs, 
> OpenLayers.Handler.Polygon,{
> title: "Draw Feature", "displayClass: "olControlDrawFeaturePolygon",multi:
> true } );
> wfs is my current layer.
>
> I had a function addLayer which add a new layer called new_layer.
>
> How to change the layer of control "draw". I looked at OL documentation 
> and
> cannot find any function to set layers.
>
> Can we change the layer which control points to by any method.?
>
> Any help will be greatly appreciated.
>
> Thanks in advance
>
> -- 
> Rashad
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20101101/28d95539/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>
>
> End of Dev Digest, Vol 50, Issue 1
> **********************************
> 


More information about the Dev mailing list