Skip to main content

Making Feature layers un-editable in HTML5 offline edit mode

Comments

1 comment

  • Permanently deleted user

    Hi Gareth,

    Currently the only way a feature layer can be configured to be editable or not is via configuration in ArcGIS server.

    It's not a good idea in general to configure editability of a layer on client side because of security concerns but

    if all you want is to disable editing tools in viewer for a certain layer you could intercept a layer after being loaded,

    check if the layer is one of the layers you like to disable then set the Editable property of the layer to false.

    The trick is finding the right event to listen to based on your scenario, for example if your scenario is switching from online to offline you could listen to FeatureLayerOfflineEvent

    but if your scenario is loading the viewer offline initially then you would probably need to listen to SiteServiceLayersLoadedEvent as well.

    As you suggested a feature could also be requested to encapsulate all that and has a configurable layer list where will be set as un-editable in the viewer.

    Hope that helps

    0

Please sign in to leave a comment.