[OpenLayers-Dev] DeleteFeature control

Alexandre Dube adube at mapgears.com
Wed Jul 22 13:22:59 EDT 2009


Eric Lemoine wrote:
> Alexandre
>
> I now understand one of your problems, you need to give the handler a
> reference to the control, but the control does not exist yet since
> you're actually creating it. Giving the handler a fake control, of the
> form {map: map} (where map is the map instance) should do the trick.
>
> I think handlers do not actually require a reference to the control,
> they just need a reference to the map (to register listeners). So I
> don't understand why we have this constraint. Anyone involved in the
> design of handlers knows?
>
>
>   

Mmm... I understand, but since I need to use callbacks on "handler" 
events, I think it's simpler to create my control the way I already did 
it.  I won't go any further in this example.

I still agree with automatic controls and handlers 
activation/deactivation.  Attached an new patch with the simple changes 
needed.  Is it ok ?  If it is, I'll open a ticket.

Again, many thanks for your help,

-- 
Alexandre Dubé
Mapgears
www.mapgears.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: control.patch
Type: text/x-diff
Size: 2236 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090722/0d0db574/control.bin


More information about the Dev mailing list