removeMapLayerWithName

2033
5
07-12-2011 09:48 AM
MarcoBrugna
New Contributor II
Hi everyone,
I'm trying to remove a layer using the 'removeMapLayerWithName' function, but I receive the following error:

'Cannot remove an observer <AGSDynamicMapServiceLayer 0x541dde0> for the key path "dpi" from <AGSDynamicMapServiceLayer 0x541dde0> because it is not registered as an observer.'


Anyone knows how to solve it?

Thanks
Marco
0 Kudos
5 Replies
NimeshJarecha
Esri Regular Contributor
Marco,

Thank you for reporting. We'll look into it.

Appreciate, if you can attach a sample app demonstrating the issue.

Thank you!

Regards,
Nimesh
0 Kudos
DastanTashimbetov
New Contributor
Did you find solution?
0 Kudos
DastanTashimbetov
New Contributor
Hi guys! In my case the problem was that It was not possible to subclass AGSDynamicMapServiceLayer. I don't know the reason for that (probably I miss something).
0 Kudos
NimeshJarecha
Esri Regular Contributor
If you want to subclass the dynamic layer then you should use AGSDynamicLayer(ForSubclassEyesOnly) .

Regards,
Nimesh
0 Kudos
DastanTashimbetov
New Contributor
If you want to subclass the dynamic layer then you should use AGSDynamicLayer(ForSubclassEyesOnly) .

Regards,
Nimesh

Thank you!
0 Kudos