|
POST
|
I managed to get this to work. Iterating through the layers was the only way I could come up with to find the layer I wanted based on Layer Name. If anyone has a better way please let me know.
string strState = cmbState.SelectionBoxItem.ToString().ToUpper();
string strlDef = "State = '" + strState + "'";
foreach (Layer myLayer in MapApplication.Current.Map.Layers)
{
strLayerName = MapApplication.GetLayerName(myLayer);
if (strLayerName == "PoliciesSDE")
{
string layerID = myLayer.ID;
LayerDefinition lDef = new LayerDefinition();
lDef.LayerID = 0;
lDef.Definition = strlDef;
// Create an ObservableCollection and add the .Definition to it.
System.Collections.ObjectModel.ObservableCollection<LayerDefinition> myObservableCollection2 =
new System.Collections.ObjectModel.ObservableCollection<LayerDefinition>();
myObservableCollection2.Add(lDef);
ArcGISDynamicMapServiceLayer dynamicServiceLayer = MapApplication.Current.Map.Layers[layerID] as ArcGISDynamicMapServiceLayer;
dynamicServiceLayer.LayerDefinitions = (myObservableCollection2);
dynamicServiceLayer.Refresh();
}
}
... View more
07-30-2012
12:06 PM
|
0
|
0
|
683
|
|
POST
|
So I changed the following line to use the Layers index number and now it works fine.
ArcGISDynamicMapServiceLayer dynamicServiceLayer = MapApplication.Current.Map.Layers[7] as ArcGISDynamicMapServiceLayer
Unfortunately this will not work for me as users have the ability to move layers in the map. I will also not be able to use the layers ID either because when I add the layer to the map using the Builder App it adds a ID like b47f9704b58b4aa6b77c93cf9faaf8f2 which varies from map to map when adding the same layer. I want my tool to go after the same layer in various map applications so I will not be able to use the layer ID as they will be different in every one. The layer I want to add a definition to will always have the same name but I can't figure out how to reference a layer by name. Has anyone been able to do this?
... View more
07-30-2012
10:45 AM
|
0
|
0
|
683
|
|
POST
|
This does not work eaither but is based on the sample in the Silverlight API Reference.
string myLayer = "PoliciesSDE";
ArcGISDynamicMapServiceLayer dynamicServiceLayer = MapApplication.Current.Map.Layers[myLayer] as ArcGISDynamicMapServiceLayer;
LayerDefinition lDef = new LayerDefinition();
lDef.LayerID = 0;
lDef.Definition = "State = 'OREGON'";
// Create an ObservableCollection and add the .Definition to it.
System.Collections.ObjectModel.ObservableCollection<LayerDefinition> myObservableCollection2 =
new System.Collections.ObjectModel.ObservableCollection<LayerDefinition>();
myObservableCollection2.Add(lDef);
MessageBox.Show("Collection made.");
dynamicServiceLayer.LayerDefinitions = (myObservableCollection2);
MessageBox.Show("Definition Applied.");
dynamicServiceLayer.Refresh();
... View more
07-20-2012
07:15 AM
|
0
|
0
|
683
|
|
POST
|
I am playing around with Layer Definitions for a ArcGISDynamicMapService. I have never done this before and I am stuck. When I run this nothing happens in my map. It seems like after it hits the dynamicServiceLayer.LayerDefinitions.Add(lDef); line it just stops without warning. I places a messagebox right after this line and it never shows. Any ideas? Thanks..
string myLayer = "PoliciesSDE";
ArcGISDynamicMapServiceLayer dynamicServiceLayer = MapApplication.Current.Map.Layers[myLayer] as ArcGISDynamicMapServiceLayer;
LayerDefinition lDef = new LayerDefinition();
lDef.LayerID = 0;
lDef.Definition = "State = 'OREGON'";
dynamicServiceLayer.LayerDefinitions.Add(lDef);
dynamicServiceLayer.Refresh();
... View more
07-20-2012
06:33 AM
|
0
|
3
|
1642
|
|
POST
|
I am trying to register a UNC directory and get an error "Invalid folder location. Unable to access this location." The Windows Domain account the server is using has Share and NTFS read permissions to this directory and has been tested outside of ArcGIS and works fine. Any ideas? This seems to me that it is another issue with how ArcGIS handles authentication when using Active Directory. Any ideas?
... View more
07-19-2012
06:18 AM
|
0
|
1
|
3075
|
|
POST
|
I can confirm this issue for us. We are using Windows user/role store with GIS Server authentication. My 1 of my AD accounts work just fine (who is an administrator, and in less than 5 AD groups). One of my other AD accounts is splattered in 15-20 AD groups and is also part of sub-groups. I was going to use my second account as a publisher to test that functionality. I added one of my co-workers who is part of many many many AD groups (with sub-groups) and it taks over 5 minutes to do anything through manager We attributed this to the 'publisher role' originally, thinking that is what was slowing it down. I added his account (and my second account) to the administrators role and it is still awfully slow. We added the AD service account as a publisher and it runs very fast. We also changed that account to be an administrator and it also runs very fast! This account is not part of any AD roles at the moment (and was only added to the 1 role when trying it as a publisher or administrator). I would agree that there seems to be a major performance issue when traversing a large AD tree where users are in many groups and there are sub-groups involved. The good news: we found a great fix that we like better so far. We've now configured the security of the site the following: User Store: Windows Domain Role Store: ArcGIS Server Built-in Auth. Tier: GIS Server Auth. Mode: ArcGIS Tokens So far this seems to have solved our performance issues as both a user consuming the services (anonymous) and as either a publisher or administrator. This also allows us to control our groups/roles without having to involve the operational IT staff that have control over AD so I think this will work better than having the role store in the windows domain. I'm wondering if this is also why we experienced slow performance issues when doing web-tier authentication as I've described here: http://forums.arcgis.com/threads/61813-Intermittent-slow-performance-accessing-rest-page I might try to re-configure the site to do web-tier authentication, but leave the role store with the ArcGIS Server Built-in. Thanks for the info Patrick. Our initial configuration was using the Windows Domain for users and ArcGIS Built-In Role Store with Web Tier authentication. The performance was good but I wasn't doing much besides logging in and configuring ther server. Unfortunately, this configuration did not meet my requirements as far as user maintenance is concerned. I need a config that would allow/revoke user access when they are added/removed to a group in AD. We will have over 1,500 users that change on a continuous basis and it would be a lot of effort to manage manually. Alos, our IT department wants full control over user access for auditing reasons. I have a support ticket open with ESRI and they are researching the issue. If there is no resolution by next week I will discuss with ESRI during the UC next week.
... View more
07-18-2012
04:29 AM
|
0
|
0
|
3311
|
|
POST
|
Well I have made some progress diagnosing the issue. I was able to succesfully log into ArcGIS Server Manasger with one of my windows domain accounts. The domain account that worked is only a part of 4 groups none of which are within nested groups. My account that does not work is in groups that are nested. When I look at how many groups that I am ultimately part of it, is around 130. This leadsme to belive ArcGIS Server has a probelm with nested groups or it has a limit on how many groups a user can be part of. Anyone else having similar issues?
... View more
07-16-2012
10:33 AM
|
0
|
0
|
3311
|
|
POST
|
I think I follow what you are saying. When you add the entire srvice in the builder you are actaully adding a Dynamic Map service (esri:ArcGISDynamicMapServiceLayer). When you add just the child layer you are adding a Feature Layer (esri:FeatureLayer). These layer types are handled differentl from one another. The Dynamic Service layer is drawn on the server where as the Feature Layer is drawn by the client. the Dynamic Service Layer is much faster on the client side. I have about 100,000 points fairly quickly. With the Feature Layer I limit my services to about 5,000 so the client doesn't hang waiting for the features to draw. Unfortunately the Dynamic Service Layer is limited in what you are actually able to configure. i belive Pop-Ups are the only thing you can configure seperately for each layer when working with a Dynamic Map Service Layer. I hope this helps...
... View more
07-12-2012
09:40 AM
|
0
|
0
|
604
|
|
POST
|
I reconfigued the web adaptor and still no luck. As it stands when I am set to use users & Roles from Windows Active Directory I am not able to log in to manager with a domain account after making a AD group Admins on the GIS server. I have tried going through the web adaptor and directy to the server at port 6080. Any other suggestions are appreciated. Update- When using ArGIS Admin Users - Security - Get Privileges I enter my user name and is shows me only as having ACCESS and not Administer even know I made a AD group I am in an Administrative group. When I check Privileges on the group I am in it shows the Access level as Administer. Stumped...
... View more
07-11-2012
04:40 AM
|
0
|
0
|
3311
|
|
POST
|
You will need to re-configure your web-adaptor to recongnize the shared key that you provided when you chose to authenticate at the web-tier. Can you login to the web-server (where IIS is running) and access this page in a browser: http://localhost/arcgis/webadaptor Rember that the 'Administrator Username' is the Primary administrator user (not the service account that was created on the local box or in your existing AD). If you've lost the shared key you can re look that up by going to the rest page: http://localhost:6080/arcgis/admin/security/config You will be prompted for credentials and you can use your primary site administrator if you havn't disabled it yet. Hopefully that will help out. I've spent the past week mucking with different security models and have had very very poor performance when using the 'web tier' for authentication. See another thread I've started here: http://forums.arcgis.com/threads/61813-Intermittent-slow-performance-accessing-rest-page I would be interested in knowing if you have similar performance issues once you get your web tier authentication working properly. HTH I am not sure the web adapter configuration is an issue as I had it set to web tier when using the arcgis role store and am using now that i switched to AD. I also used the exact same password when I changed it. However I will give it a try just in case. GIS setup is much simpler than yours so I am not sure how much I will be able to help in the way of performance but I would be glad to share my experience once I am up and running.
... View more
07-10-2012
12:02 PM
|
0
|
0
|
3311
|
|
POST
|
Thanks for the reply. I am using the Web Tier Authentication. The User/Role Store is set to Windows Domain. I made the following changes on IIS. I wasn't able to access any service until I made these changes: - Disable Anonymous access to the 'arcgis' virtual directory - Enable Windows Authentication in the 'arcgis' virtual directory - Move 'NTLM' to the top of the list or Providers - Restart IIS I did configure the web adapter after we set up security on the GIS Site. I did this while I was using an ArcGIS role store. After switching to AD I no longer have access to the Web Adaptor. I get a 403 Forbidden Access. It seams like this is happening because the server thinks I am not an Admin anymore. I did allow management through the web adaptor.
... View more
07-10-2012
11:39 AM
|
0
|
0
|
3311
|
|
POST
|
I am trying to set up my initial roles in 10.1 using an Active Directory role store. I logged in as the PSA and serched for a AD group that I am in and gave it Administrative rights. I log out of manager and try to log in with my domain account and get "You must enter an account that is a member of either the Administrator or Publisher roles for this site." I tried using domain\UserName with the same result. I also tried giving this role access to the entire site. Any Ideas why I can't log into manager using an AD Role? Additional info: ArcGIS Server 10.1, IIS 7, & Web Adaptor all installed on same server. I have the default services running and can set security on the services using Active Directory Roles.
... View more
07-10-2012
10:34 AM
|
0
|
24
|
10782
|
|
POST
|
Not perfectly but for my needs the following woked fine for me. It gives me the orange glow on selection with animation but the glow is not ecactly the same as the default ESRI glow. I played around with it for a while to get it close as possible. You will aslo see that I added a hover animation so that I could show a label on hover. You could remove that if you didn't want it. Hope it helps you..
<esri:MarkerSymbol x:Name="CustomStrobeMarkerSymbol">
<esri:MarkerSymbol.ControlTemplate>
<ControlTemplate>
<Canvas>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Selected">
<Storyboard RepeatBehavior="1x">
<DoubleAnimation BeginTime="0" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" From="1" To="6" Duration="00:00:00.5" />
<DoubleAnimation BeginTime="0" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" From="1" To="6" Duration="00:00:00.5" />
<DoubleAnimation BeginTime="0" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.Opacity)" From="1" To="1" Duration="00:00:01" />
</Storyboard>
</VisualState>
<VisualState x:Name="Unselected" />
</VisualStateGroup>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="labelOnHover"
Storyboard.TargetProperty="Visibility"
Duration="0">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation From="0" To="1" Storyboard.TargetName="labelOnHover"
Storyboard.TargetProperty="Opacity"
Duration="0:0:.25" />
</Storyboard>
</VisualState>
<VisualState x:Name="Normal" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Ellipse Height="10" Width="10" Canvas.Left="-5" Canvas.Top="-5" RenderTransformOrigin="0.5,0.5" x:Name="ellipse" IsHitTestVisible="False">
<Ellipse.RenderTransform>
<ScaleTransform />
</Ellipse.RenderTransform>
<Ellipse.Fill>
<RadialGradientBrush>
<GradientStop Color="#8DFFFF00" />
<GradientStop Color="#8DFFFF00" Offset=".4" />
<GradientStop Color="#8DFF7600" Offset=".8" />
<GradientStop Color="#00FF7600" Offset="1" />
<!--<GradientStop Color="#00FF0000" Offset="1" />-->
</RadialGradientBrush>
</Ellipse.Fill>
</Ellipse>
<Ellipse Height="10" Width="10" Canvas.Left="-5" Canvas.Top="-5" Fill="#FFFF0000" x:Name="ellipse1" />
<Grid Margin="8,-8,0,0" x:Name="labelOnHover" Visibility="Collapsed"
HorizontalAlignment="Left" VerticalAlignment="Top" >
<!--Text halo using a white blurred text-->
<TextBlock Foreground="White" FontWeight="Bold" Text="{Binding Attributes[POLICY_NO]}" >
<TextBlock.Effect>
<BlurEffect Radius="5" />
</TextBlock.Effect>
</TextBlock>
<!--Text-->
<TextBlock Foreground="Black" FontWeight="Bold" Text="{Binding Attributes[POLICY_NO]}" />
</Grid>
</Canvas>
</ControlTemplate>
</esri:MarkerSymbol.ControlTemplate>
</esri:MarkerSymbol>
... View more
07-09-2012
04:22 AM
|
0
|
0
|
2173
|
|
POST
|
I am trying to restrict an add-in from working on the basemap layer and the top layer in the TOC. The add-in shows in the right click menu of a layer. The code I have disables the add-in correctly if you left click the layer to select and then right click to get the context menu. However, if you right click another layer to select and open the right click menu at the same time it is not working correctly. It still at the previously selected layer to see if the add-in can execute. If I right click the layer again it works fine. It seems like the right click menu is appearing before the canexecute event finishes. Is it something I am doing wrong in my code?
namespace LayerOrder.AddIns
{
[Export(typeof(ICommand))]
[DisplayName("Move Layer Up")]
[ESRI.ArcGIS.Client.Extensibility.Description("Move selected layer up.")]
public class MoveLayerUp : ICommand
{
#region ICommand members
public bool CanExecute(object parameter)
{
Layer myselectedlayer = MapApplication.Current.SelectedLayer;
int mylayerid = MapApplication.Current.Map.Layers.IndexOf(myselectedlayer);
int layercount = MapApplication.Current.Map.Layers.Count;
if (mylayerid == 0)
return false;
else if (mylayerid == (layercount - 1))
return false;
else
return true;
}
public event EventHandler CanExecuteChanged;
public void Execute(object parameter)
{
Layer selectedlayer = MapApplication.Current.SelectedLayer;
int layerid = MapApplication.Current.Map.Layers.IndexOf(selectedlayer);
MapApplication.Current.Map.MoveLayer(layerid, layerid + 1);
}
#endregion
}
}
... View more
06-20-2012
08:16 AM
|
0
|
1
|
2735
|
|
POST
|
Has this bug been squished in the 10.1 production release? Thanks.
... View more
06-14-2012
04:47 AM
|
0
|
0
|
1190
|
| Title | Kudos | Posted |
|---|---|---|
| 4 | 03-12-2025 11:01 AM | |
| 3 | 01-08-2025 09:26 AM | |
| 1 | 01-08-2025 07:19 AM | |
| 1 | 12-06-2024 04:52 AM | |
| 2 | 03-19-2024 04:36 AM |
| Online Status |
Online
|
| Date Last Visited |
7 hours ago
|