[OpenLayers-Users] Erase feature

Alexandre Dube adube at mapgears.com
Wed Sep 23 09:41:30 EDT 2009


Hi,

  Please, reply to the list.  Others might be able to help too.

  Mmm, I don't see what's wrong.  Do you have a minimized version 
showing your problem ?  Can you make it live (online) ?

http://docs.openlayers.org/help/minimize.html

Regards,

Alexandre

Vidal, Antoni wrote:
> Hello,
>
> It works properly but I want to show a confirm before delete feature, but it doesn't appers.
>
> Here's my code:
>
>             oDeleteLnCtrl = new OpenLayers.Control.DeleteFeature(layer, {'silent':false,displayClass:'olControlEsborra','box':true, 'multiple': true, title:_("Esborrar elements"), eventListeners: eventListeners})
> 			oDeleteLnCtrl.events.register("beforefeaturesdeleted", '', function(e){alert("it works");});
> 			controls[4] = oDeleteLnCtrl;
> 			this.addControls(controls);
>
> Following your comments, I set silent:false, but the test alert of function(e) isn't showed. 
>
> Any idea?
>
> Thank's again.
>
> Antoni Vidal
> Unitat d'Aplicacions SIG-WEB
> Institut Cartogràfic de Catalunya
> Parc de Montjuïc, E-08038 Barcelona
> Tel. (+34) 93 567 15 00 (ext. 3228)
> www.icc.cat
>  
>
> -----Missatge original-----
> De: Alexandre Dube [mailto:adube at mapgears.com] 
> Enviat: lunes, 21 de septiembre de 2009 15:05
> Per a: Vidal, Antoni
> A/c: users at openlayers.org
> Tema: Re: [OpenLayers-Users] Erase feature
>
> Hi,
>
> Take a look at this ticket : http://trac.openlayers.org/ticket/1882 , 
> see deletefeature.patch. It's a control that does what you want. It's 
> not in the official API though.
>
> See an example of use (see the (X) button ) : 
> http://dev4.mapgears.com/bdga-fs/
>
> Hope this helps,
>
> Alexandre
>
> Vidal, Antoni wrote:
>   
>> Hello list,
>>
>> I our OL viewer (http://www.icc.cat/vissir2 ) there is a delete-erase 
>> feature in editingtolbar menu. It was created for version 2.6 and with 
>> some additional changes, worked with 2.7. It doesn't work with 2.8 and 
>> before spent lot of time in the solution I thought if somebody knows 
>> or have a similar tool working well with 2.8?
>>
>> Thank's in advance
>>
>> *Antoni Vidal*
>>
>> Unitat d'Aplicacions SIG-WEB
>> Institut Cartogràfic de Catalunya 
>> <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392>
>> Parc de Montjuïc, E-08038 Barcelona
>> Tel. (+34) 93 567 15 00 (ext. 3228)
>> www.icc.cat <http://www.icc.cat/>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>   
>>     
>
>
>   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list