[OpenLayers-Users] howto regist. featuremodified instead onModification ?

Alexandre Dube adube at mapgears.com
Wed Dec 17 09:10:47 EST 2008


Eric Lemoine wrote:
> On Tue, Dec 16, 2008 at 6:10 PM, Alexandre Dube <adube at mapgears.com> wrote:
>   
>> Eric Lemoine wrote:
>>     
>>> On Fri, Dec 12, 2008 at 8:19 PM, Alexandre Dube <adube at mapgears.com>
>>> wrote:
>>>
>>>       
>>>> Well, I don't 100% understand.
>>>>
>>>>         
>>> An example is worth a lengthy explanation:
>>>
>>> var foobar = {"foo": "bar"};
>>> layer.events.on({
>>>    featuremodified: function(o) {
>>>        // "this" references the foobar object
>>>        // created above
>>>        console.log(this);
>>>    },
>>>    scope: foobar
>>> });
>>>
>>> Hope this helps,
>>>
>>> --
>>> Eric
>>>
>>>       
>> An interesting article about scopes in JavaScript :
>> http://www.digital-web.com/articles/scope_in_javascript
>>     
>
> Thanks Alexandre.
>
> And a very interesting one on closures:
> <http://www.jibbering.com/faq/faq_notes/closures.html>. I've been
> advertising this one a lot lately :-)
>
> --
> Eric
>   
Hi Eric,

Thanks for the link.

Alexandre

-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list