I'm in the process of implementing API3's new features and have come up to a potential roadblock.In my SL app I'm trying to activate different features based on access levels. Say User1 only has permission from the server to view Layer1, and User2 has access to both Layer1 and Feature1. How would I write it so if User1 logs in, he can still use the map and see Layer1, where if User2 logs in, both layers and editor load? Sometime is works, sometimes no layer loads. And how would I keep the programming from challenging lower access level users a second time?
<esri:Map Name="MyMap" >
<!-- EsriBasemap-->
<esri:ArcGISDynamicMapServiceLayer
Url="layerurl"/>
<!-- Low Access Level Layer-->
<esri:ArcGISDynamicMapServiceLayer Name="Layer1"
Url="LowAccessLevelURL" />
<!-- Protected Feature Service-->
<esri:FeatureLayer Name= "Feature1"
Url="featureurl" Initialized="FeatureLayer_Initialized"/>
</esri:Map>
<esri:EditorWidget x:Name="MyEditorWidget" Map="{Binding ElementName=MyMap}" Visibility="Collapsed" />
public MainPage()
{
InitializeComponent();
IdentityManager.Current.ChallengeMethod = SignInDialog.DoSignIn;
}
private void FeatureLayer_Initialized(object sender, EventArgs e)
{
MyEditorWidget.Visibility = Visibility.Visible;
}