[OpenLayers-Dev] editing tool on multiple layers
Mohammed Rashad
mohammedrashadkm at gmail.com
Fri Apr 15 09:44:59 EDT 2011
I have two layers
layer1
layer2
both are editable vector layers
for layer1 is point layer and layer2 is poygon layers
I had registered some events. both are sharing same events but the behaviour
of events is different
for example
layer1.events.register("featureadded",'',FeatureAdded);
function FeatureAdded(){
alert('layer1');
};
layer2.events.register("featureadded",'',FeatureAdded);
function FeatureAdded(){
alert('layer2');
};
how to define the function as local to a specific layer so that I can use
the same function defined twice whose defenition is different.?
Can I remove the function from the code dynamically?
How to register a function local to the layer.
I will dynamically change the layer using checkboxes which are not part of
OpenLayers.
when I check the checkbox
I can do the following
Toggle layer visibility
destroy controlpanel and create tie it to the new layer (say layer 2)
I redefined the functions for featureadded event (FeatureAdded) but the old
function is in use not the redefined one
How can I use the newly defined FeatureAdded function for a featureadded
event after changing the layer
I think some questions are not related to OpenLayers. if so forgive me
Any help will be greatly appreciated
--
Thanks && Regards
Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20110415/1e796eae/attachment.html
More information about the Dev
mailing list