POST
|
Dominique Broux Basically, I need to execute a ArcGISDynamicMapServiceLayer.GetAllDetails() so that I can populate the sub layers with the returned FeatureLayerInfo objects, specifically the layer descriptions. Unless I've completely missed something about the ArcGISDynamicMapServiceLayer to tell it to return the FeatureLayerInfos on its own, which it doesn't seem to currently do.
... View more
05-06-2015
10:09 AM
|
0
|
0
|
323
|
POST
|
Sorry for the late reply, but LayerDescription returns the service description as it does in the example you have provided, not the description given to that particular feature layer. Also, after scouring the LayerInfo for sub-layers during run time the LayerDescription object is always null. The rest api doesn't seem to return the descriptions for the layers when doing a call to the map service.
... View more
05-05-2015
01:40 PM
|
0
|
1
|
323
|
POST
|
Thanks for the quick reply. Would you happen to know if the messages get written somewhere else in the interpreter? or rather, the ultimate place that they trickle down to? I tried redirecting sys.stdout / sys.stderr but it seem arcpy.AddMessage doesn't seem to write to there either. However, there must be a standard Python object that receives the messages because my IDE console always displays them.
... View more
02-25-2014
05:02 AM
|
0
|
0
|
481
|
POST
|
What then does the documentation refer to ? http://resources.arcgis.com/en/help/main/10.1/index.html#/AddMessage/018v00000007000000/] AddMessage (arcpy) Summary Creates a geoprocessing informative message (Severity=0) that can be accessed with any of the GetMessages functions.
... View more
02-25-2014
04:29 AM
|
0
|
0
|
481
|
POST
|
I am trying to access the messages that were logged throughout a script.
arcpy.AddMessage("Something...")
message = arcpy.GetMessages()
print message # always empty
The above is always empty. According to the documentation [http://resources.arcgis.com/en/help/main/10.1/index.html#/AddMessage/018v00000007000000/] Creates a geoprocessing informative message (Severity=0) that can be accessed with any of the GetMessages functions. What am I missing here? I'm starting to think this is either a bug or something not documented.
... View more
02-24-2014
10:30 AM
|
0
|
5
|
1249
|
POST
|
Hi, I am trying to bind to the LegendItemViewModel.Description property but the value never shows up or defaults to the Map Services description. Yet all the other property values exists.
<DataTemplate x:Key="LayerTemplate">
<StackPanel Margin="0,-1" Orientation="Horizontal" >
<ToolTipService.ToolTip>
<StackPanel MaxWidth="400">
<TextBlock FontWeight="Bold" Text="{Binding Path=Layer.ID }" TextWrapping="Wrap" />
<TextBlock FontWeight="Bold" Text="{Binding Path=Label}" TextWrapping="Wrap" />
<TextBlock Text="{Binding Path=Description}" />
<TextBlock Text="{Binding Path=SubLayerID, StringFormat='SubLayer ID : {0}'}" />
</StackPanel>
</ToolTipService.ToolTip> I debugged where the value gets set in LayerItemViewModel...
internal LayerItemViewModel(Layer layer, LayerLegendInfo layerLegendInfo, string defaultLayerDescription, Map map)
: this(layer)
{
Debug.Assert(layerLegendInfo != null);
Debug.Assert(map != null); // Needed to convert scale to resolution
SubLayerID = layerLegendInfo.SubLayerID;
Label = layerLegendInfo.LayerName;
ParentLabel = layer.DisplayName ?? layer.ID;
LayerType = layerLegendInfo.LayerType;
IsHidden = layerLegendInfo.IsHidden;
if (string.IsNullOrEmpty(layerLegendInfo.LayerDescription))
Description = defaultLayerDescription;
else
Description = layerLegendInfo.LayerDescription;
and it seems that layerLegendInfo.LayerDescription is always null. I should add that this is a 10.0 service.
... View more
01-06-2014
07:56 AM
|
0
|
3
|
3718
|
POST
|
Hi, I am trying to bind to the LegendItemViewModel.Description but the description never shows up. Yet all the other property values exists.
<DataTemplate x:Key="LayerTemplate">
<StackPanel Margin="0,-1" Orientation="Horizontal" >
<ToolTipService.ToolTip>
<StackPanel MaxWidth="400">
<TextBlock FontWeight="Bold" Text="{Binding Path=Layer.ID }" TextWrapping="Wrap" />
<TextBlock FontWeight="Bold" Text="{Binding Path=Label}" TextWrapping="Wrap" />
<TextBlock Text="{Binding Path=Description}" />
<TextBlock Text="{Binding Path=SubLayerID, StringFormat='SubLayer ID : {0}'}" />
</StackPanel>
</ToolTipService.ToolTip> I debugged where the value gets set in LayerItemViewModel...
/// <summary>
/// Initializes a new instance of the <see cref="LayerItemViewModel"/> class from a <see cref="LayerLegendInfo"/>..
/// </summary>
/// <param name="layer">The layer.</param>
/// <param name="layerLegendInfo">The layer legend info.</param>
/// <param name="defaultLayerDescription">The default layer description (= the map layer description).</param>
/// <param name="map">The map.</param>
internal LayerItemViewModel(Layer layer, LayerLegendInfo layerLegendInfo, string defaultLayerDescription, Map map)
: this(layer)
{
Debug.Assert(layerLegendInfo != null);
Debug.Assert(map != null); // Needed to convert scale to resolution
SubLayerID = layerLegendInfo.SubLayerID;
Label = layerLegendInfo.LayerName;
ParentLabel = layer.DisplayName ?? layer.ID;
LayerType = layerLegendInfo.LayerType;
IsHidden = layerLegendInfo.IsHidden;
if (string.IsNullOrEmpty(layerLegendInfo.LayerDescription))
Description = defaultLayerDescription;
else
Description = layerLegendInfo.LayerDescription;
and it seems that layerLegendInfo.LayerDescription is always null.
... View more
01-06-2014
07:45 AM
|
0
|
0
|
705
|
POST
|
I am trying to do something similar when running Python scripts that check the integrity of our tools. I'm trying to build the ability to restore test data to it original state after a test passes or fails but for some of our tools the locks in the database remain even after the geoprocessing has finished. It's only when the Python interpreter process is killed that the locks release. That means I cant restore the data without exiting the script runner. I've been trying to find a way to either run the tool on a seperate python process or somehow remove the locks but I cant seem to solve the problem. Any ideas?
... View more
11-25-2013
01:50 PM
|
0
|
0
|
2096
|
POST
|
Hi, Our python script library is starting to get large and complex to the point that we are introducing unit testing to keep problems manageable. Has anyone had any experience creating Unit Tests for their python. How did you mock ArcGIS objects? Thanks
... View more
09-10-2013
01:56 PM
|
0
|
4
|
4578
|
POST
|
Hi, Has anyone had any experience creating Unit Tests for their application and how to work them with/against the API. How did you mock ArcGIS objects? Did you wrap ArcGIS objects in order to make them testable? Thanks
... View more
07-30-2013
12:43 PM
|
0
|
0
|
1814
|
POST
|
This is terrible. If ESRI has a fix for this problem, they need to release it as a hotfix right now. I've seen other posts in the forum about this very problem. However, when you call tech support, it's like they've never heard of it (I've sent links to this thread and others to two different techs). ESRI - this is supposed to be an enterprise level solution, fix this problem. We should not have to wait for your show next month for the fix. This needs to be addressed in a hotfix (along with the special characters in passwords issue and UNC path registration issues). These are serious issues that make it almost impossible to deploy a redundant enterprise system. I Second this. It is unreasonable that we should have to wait for 10.2 to patch problems in 10.1.
... View more
05-31-2013
05:45 AM
|
0
|
0
|
810
|
POST
|
Hello, I was just wondering how similar the ArcGIS WPF API is to the Silverlight version? We've been developing and applicaiton in the Silverlight realm and are thinking of moving to WPF.
... View more
05-29-2013
01:30 PM
|
0
|
0
|
532
|
POST
|
The data template by default is a textblock. You will need to modify it to have a textblock for normal values and a hyperlink button for hyperlinks.
<data:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding Value}" FontSize="11" Margin="3,2,3,2" HorizontalAlignment="Left" TextAlignment="left" Visibility="{Binding Converter={StaticResource LinkCollapsedConverter}}"/>
<HyperlinkButton Content="Click for more info..." FontSize="11" Margin="3,2,3,2" HorizontalAlignment="Left" NavigateUri="{Binding Value}" TargetName="_blank" Visibility="{Binding Converter={StaticResource LinkVisibilityConverter}}"/>
</Grid>
</DataTemplate>
</data:DataGridTemplateColumn.CellTemplate> Then create two converters, one for the textblock and another for the hyperlink button. When one is converter evaluates true it will show the element associated with it, the other will be false and hide the element associated with it. public class LinkCollapsedConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
{
return Visibility.Visible;
}
KeyValuePair<string, object> _value = (KeyValuePair<string, object>) value;
if (_value.Value == null)
{
return Visibility.Visible;
}
if (_value.Value.ToString().StartsWith("http"))
{
return Visibility.Collapsed;
}
return Visibility.Visible;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return null;
}
}
... View more
03-28-2013
01:32 PM
|
0
|
0
|
241
|
POST
|
Hi, I was wondering if there is any functionality (preferable client side) to check a ring / polygon for correct geometry, specifically the ring vertices direction. Reason why is I'm using Kml files and Google Earth likes to create rings opposite way of ESRI's format. I've already built in the ability to reverse the direction but I would prefer to check the direction first before reversing the vertices.
... View more
03-28-2013
12:58 PM
|
0
|
1
|
752
|
POST
|
I did this in the silverlight API. I had to do an attachment query the target feature(s) then read the URL. not sure how it translates to JS but it was something like FeatureLayerInfo queryFeatLayerInfo = queryFeatLayer.LayerInfo;
try
{
if (queryFeatLayerInfo.HasAttachments)
{
queryFeatLayer.QueryAttachmentInfos(featureGraphic,
FeatureLayer_QryAttachmentsComplete,
FeatureLayer_QryAttachmentsFail);
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
} Then when it returns the results you just read the url off the attachment info. var attachmentInfos = aInfos as IList<AttachmentInfo>
if (attachmentInfos.Any())
{
image.url = attachmentInfos.First().Uri.ToString()
} It reads the url location of the 'Output' folder on the arcgis server. May have to configure that folders permissions, i think i had too. Hope that helps
... View more
02-28-2013
09:47 AM
|
0
|
1
|
1402
|
Online Status |
Offline
|
Date Last Visited |
11-14-2023
09:26 PM
|