Select to view content in your preferred language

Switch Map Service layers to Feature layers for editing in Smart Editor widget

1196
3
06-28-2017 04:43 AM
MihkelMänna
Frequent Contributor

I'm looking to implement an extension to the Smart Editor widget that would replace some Map Service layers in my app to Feature Service layers when the widget is opened. That would make them available for editing and I would benefit from the map service design (custom labels etc.) when the widget is not active.

Has anyone managed to accomplish this? I'm not sure what would be the best way to approach this.

At the moment, I'm trying to replace the Map Service layers with their Portal Item Feature Layer equivalents before the widget is started up but I have problems with the widget not recognizing them as editable layers. Is this the way to go at all? Thanks for any suggestions/advice!

0 Kudos
3 Replies
MihkelMänna
Frequent Contributor

Okay, I changed the approach and added the Map Service layers as well as feature layers to the map, hided feature layers in the Layer List widget and elsewhere, and toggle them on when editing only. Everything seems to be working fine! I think this must be the easiest approach.

0 Kudos
MihkelMänna
Frequent Contributor

Actually, things aren't quite okay. When adding both Map Service and Feature Service layers of the same service to the map, only Map Service layers are displayed and Feature Service layers contain no graphics. One can add new features with editing but not edit existing features because they can't be clicked on the map. I'm still looking for a solution to this...

0 Kudos
AliBarakat
Frequent Contributor

Hi Mihkel,

I just tried the same process before reading this thread.

it is working fine so far.

the trick is that you need to enable popups for both layers, then hide the FS.

Please let me know if this works with you as well.

Have a nice day

Regards,

Ali