POST
|
I have a similar question except I want a link to show up in the identify results window using the Silverlight API. I figured out how to create a link for one attachment, but not for more than one attachment. I added a hyperlink button to the bottom of the identify results window and, in the c# code, pulled the first data value (object ID) from the selected feature in the comboBox and added that to the hyperlink uri. The attachment ID seemed to match the feature object ID. However, I am not sure how the attachment ID for the second one is generated so I am not able to create a link to it. I'm trying to access the feature attachment infos property, but I am not sure how to do so. Anyway, I hope that this gives you a little more info on how one might go about it. I'm not very familiar with the Viewer though. The attachment editor would be great except we don't want users to be able to add or delete attachments. Plus having a link in the identify results window would be more user friendly in our case. Thanks, Michelle Michelle, Did you ever find a solution to this? I'm looking to do something similar and have tried a few things with no luck.
... View more
03-28-2014
11:45 AM
|
0
|
0
|
1122
|
POST
|
Hah! I found something that I suspected was still saved in my drop box. This was roughly the code for my purposes: foreach (LegendItemInfo legItem in (List<LegendItemInfo>)treeNode.ItemsSource)
{
if (legItem.ImageSource != null)
itemLabel = (((List<LegendItemInfo>)treeNode.ItemSource.Count -- 1) ?
layerName : legItem.Label;
if (itemLabel.Contains(removed content)
{ legendItem.Add(new LegendItemInfo() { ImageSource = legItem.ImageSource, Label = itemLabel });
}
}
} What that tells me is that legendItem was declared elsewhere as a LegendItemInfo or something similar (note its difference from legItem). I can't be certain but that's the best clue I've got :(. Sorry for the coding format. Retyping from a PDF ;o. Good luck!
... View more
11-14-2013
07:17 AM
|
0
|
0
|
562
|
POST
|
Hi there, Sorry for the delay - I was on vacation. I actually work with a different company now so I don't have access to exactly how I did it. I suspect I was using the LayerLegendInfo or LegendItemInfo class (or something else similar to do with Legend or Layers...) and reading one of their values into my legendItem variable... http://resources.arcgis.com/en/help/silverlight-api/concepts/0166/pdf/ESRI.ArcGIS.Client.pdf That's a link to the Client Namespace where you'll find those classes and their methods/properties. http://resources.arcgis.com/en/help/silverlight-api/concepts/0166/pdf/ArcGISSilverlightOMD_Overview.pdf That's a link to an overview :). http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm These are examples. I don't doubt I got some of my ideas from there, probably including what I was looking for here (check out the Toolkit Controls > Legend with Templates) I'm really sorry I can't help you out more. I have a pitiful memory :(.
... View more
11-14-2013
07:07 AM
|
0
|
0
|
562
|
POST
|
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//007000000012000000 1 - Yes, you are getting that jagged line because of it being derived from a raster. Perhaps you could use something like that to smooth the result? 2 - Not sure how you'd go about doing this. Offhand, I can't remember what the VAT looks like for the least cost path raster.
... View more
05-29-2013
01:31 PM
|
0
|
0
|
205
|
POST
|
This sounds more like you're not willing to do research on your own for a class. Put some effort in -- you'll find that you actually understand things better after trying (even if you're not 100% successful). Look at the ArcGIS Help. There's a lot of documentation on the benefits of adding geodatabase behaviour, as well as the how-to for doing it. Here are a couple links to get you started: http://resources.arcgis.com/en/help/main/10.1/index.html#//005r00000001000000 http://resources.arcgis.com/en/help/main/10.1/index.html#/A_quick_tour_of_attribute_domains/003n000000zt000000/ http://resources.arcgis.com/en/help/main/10.1/index.html#/An_overview_of_topology_in_ArcGIS/006200000001000000/ http://resources.arcgis.com/en/help/main/10.1/index.html#/Relationships_and_ArcGIS/004t00000001000000/ Try to not have us write your thesis and main arguments for you, eh? Good luck.
... View more
05-16-2013
02:29 PM
|
0
|
0
|
587
|
POST
|
Greetings, I am trying to get the user's current map extent but everything I've tried so far has been along the lines of a catastrophic failure (I'm new to C#/Silverlight/XAML) :(. I'm aware that [url=http://resources.arcgis.com/en/help/silverlight-viewer/samples/start.html]this[/url] exists but I've never tried implementing a sample before and am quite stuck. Anyway, long story short, I'm trying to figure out how to get the map extents of the user's current zoom level and I've been stuck for a few days. Any help? :(. I'm not sure what steps to take in implementing a code sample (and have them be successful). Thanks in advance, Jenn edit: We're not technically using the ArcGIS Viewer for Silverlight product, but since the code is widget-based I thought this would be an applicable example. Please let me know if I'm headed in the wrong direction
... View more
05-16-2013
12:06 PM
|
0
|
0
|
1804
|
POST
|
Greetings, I am trying to get the user's current map extent but everything I've tried so far has been along the lines of a catastrophic failure (I'm new to C#/Silverlight/XAML) :(. I think part of the problem that I'm running into is that I don't know enough about it to deviate from some of the examples given. I'm aware that this exists but the problem is that I'm using the ESRI Silverlight Viewer and I'm trying to get this map extent functionality in a different widget (not where the main map layers are defined). I see a lot of this (excerpt from above link), or variations of this definition in a lot of examples but it doesn't particularly help with what I'm doing since, as I said, the layers are added in an AppConfig.xml file I have: <esri:Map x:Name="MyMap" WrapAround="True" ExtentChanged="MyMap_ExtentChanged" ExtentChanging="MyMap_ExtentChanged">
<esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
</esri:Map> Anyway, long story short, I'm trying to figure out how to get the map extents of the user's current zoom level and I've been stuck for a few days. Any help? 😞 Thanks in advance, Jenn
... View more
05-16-2013
11:49 AM
|
0
|
0
|
341
|
POST
|
Why not go ahead and give it a try? 🙂 lblclass.expression = str([Field1]) + " " + str([Field2]) Not actually able to test Caleb's idea but there's no harm in trying that.
... View more
05-08-2013
03:48 PM
|
0
|
0
|
417
|
POST
|
No matter how great a debugger is, they can only be so good at finding what are called "logical" errors. Syntax errors are just that--perhaps a missing colon or indentation. Logical errors mean that the way you've tried to solve a problem is incorrect. For clarification, do these tools just stop working after some period of time even if you haven't ever edited them? Or are you changing them and then realizing they don't work? And one more point of clarification: are the errors you're being required to manually locate actually syntax errors? I don't think that part was quite clear to me.
... View more
05-08-2013
03:32 PM
|
0
|
0
|
654
|
POST
|
What are your environment settings for raster like? Do they make sense with what you're working on? I've accidentally goofed up my environments before which have caused geoprocessing failures like this.
... View more
05-08-2013
03:22 PM
|
0
|
0
|
1179
|
POST
|
Mahender, It's the Silverlight Viewer. I found a "work around" that my supervisor has accepted. All our raster imagery have similar labels, so I'm just excluding them on the basis of "if legendItem.Label.Contains("")." Thank you so much. It really means a lot to me that you took time to help me =). Cheers, Jenn
... View more
05-08-2013
08:19 AM
|
0
|
0
|
562
|
POST
|
In Xaml include the refreshed event (replace the map, layerIDS): <esri:Legend Map="{Binding ElementName=MyMap}"
LayerIDs="Points of Interest, United States"
LayerItemsMode="Tree"
ShowOnlyVisibleLayers="False"
Refreshed="Legend_Refreshed">
Mahender, First of all, thank you so much for taking the time to respond. It's greatly appreciated! I like the direction you're pointing me in, but likely due to me being a novice, the code from you I've quoted has confused me a bit. Is it required that I specify LayerIDs? Since this widget is being designed to work on a product for many different clients, I'd like it to be as dynamic and flexible as possible (I'm not building this map from the ground-up. It already exists and I'm just fine-tuning it, such as removing rasters from the print widget legend). Regards, Jenn edit: Alas, when I tried to implement the solution... "Error: Unhandled Error in Silverlight Application Code: 2531 Category: ParserError Message: Failed to assign to property 'ESRI.ArcGIS.Client.Toolkit.Legend.Refreshed'." Guess I have to figure this out! 😃 edit 2: I suppose I'll have a hard time getting your solution to work. The way the legend is defined in the XAML is... unusual?
<StackPanel x:Name="LegendPanel" Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Top">
<StackPanel.Resources>
<DataTemplate x:Key="SymbolTreeNode">
<StackPanel Orientation="Horizontal" Margin="0,-2,0,-2">
<Image Source="{Binding ImageSource}" Stretch="None" Width="36" Margin="0,0,0,0"></Image>
<TextBlock Text="{Binding Label}" Margin="4,0,0,0" VerticalAlignment="Center"></TextBlock>
</StackPanel>
</DataTemplate>
</StackPanel.Resources>
</StackPanel>
... View more
05-07-2013
09:25 AM
|
0
|
0
|
562
|
POST
|
Hi everyone, I'm trying to adjust my Print Widget so that raster layers do not show up in the legend. My thinking was that I could test for a layer type and not add the item to the legend if it is a raster. Something like: For each item in the legend If layer is a raster: do nothing; Else Add it to the legend I know there's a LayerInfo thing out there but I'm not really sure how to use it. Incidentally, I'm new to C#/Silverlight/ArcGIS for Server so this simple task is a bit challenging for me. I did notice there was a GetType() method(?) that I might be able to use but I'm not sure if how if that is indeed the answer. The foreach legend item code already exists and such -- I'm looking to wrap some conditions around the legendItems.Add bit. Alternatively, if I'm going about this in a difficult/wrong way, feel free to point that out! Thanks in advance! [ATTACH=CONFIG]24024[/ATTACH] edit: found the following resources, but not sure how to use them if they are helpful... http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureService.FeatureLayerInfo_members.html --> the "Type" property, perhaps?
... View more
05-03-2013
01:44 PM
|
0
|
8
|
854
|
POST
|
Hi there, I'm a GIS intern (no prior experience in any C#,Silverlight, Visual Studio, etc.) and have been tasked with creating a widget. This widget would allow whoever is using the web map to be able to click a button (toggling a menu of sorts) where they can a) save a KML of the current view, b) save a KML from the results of a query, c) save a KML from a particular layer. I've spent the past two days just orienting myself with ArcGIS Server stuff, C#, but I don't even know where to start. I've found the sharpKML tool which seems like it could prove to be useful at some point in the process... I think I could manage to create a KML file using that, but what I can't seem to even get a grip on is somehow converting the data to KML (or even understanding how to access components of layers :(). Thank you in advance. Any helpis much appreciated!
... View more
04-23-2013
02:46 PM
|
0
|
0
|
515
|
Title | Kudos | Posted |
---|---|---|
1 | 06-28-2017 08:36 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|