Select to view content in your preferred language

FeatureLayer.remove() is not supported. Use applyEdits()

848
3
07-08-2011 05:50 AM
Ganael_Jatteau
Emerging Contributor
Hi,

I have a feature layer on Flex application that comes from a non editable service. I'm just interested to have some graphics on the client side so I can do some modifications (I don't want to modify anything on the feature service). How can I remove a graphic on that layer?
The method FeatureLayer.remove(graphic) returns:

FeatureLayer.remove() is not supported. Use applyEdits()

But I can't call applyEdits() on that layer.

Thanks in advance!
Tags (2)
0 Kudos
3 Replies
ZahidChaudhry
Deactivated User
Hi,

I have a feature layer on Flex application that comes from a non editable service. I'm just interested to have some graphics on the client side so I can do some modifications (I don't want to modify anything on the feature service). How can I remove a graphic on that layer?
The method FeatureLayer.remove(graphic) returns:

FeatureLayer.remove() is not supported. Use applyEdits()

But I can't call applyEdits() on that layer.

Thanks in advance!


You can create a graphics layer and then remove graphics from graphics layer....This way it will not edit your data...just a thought
0 Kudos
Ganael_Jatteau
Emerging Contributor
Thanks for the suggestion. The problem is I want to take advantage of the FeatureLayer to automatically query new graphics when the extent changes.
0 Kudos
IvanBespalov
Frequent Contributor
...when the extent changes...

1 - listen Map.extenChange event. Now you can handle.

...to automatically query new graphics...

2 - clear selection on FeatureLayer.

3 - make a new selection, where Query parameter "Input Geometry" is Extent you just listened with Map.extenChange handler.
0 Kudos