POST
|
Hi, I'm trying to initialize my feature layer, and I'm getting the error on the last line (myVisibleFeatureLayers) saying "cannot implicitly convert type 'string[]' to 'ESRI.ArcGIS.Client.FeatureLayer'". I'm pretty new to Silverlight, not sure what I'm doing wrong? I have copied the code for initializing a WMS layer and tried to modify it to work for a feature layer. private void FeatureLayerDockPhotos2011_Initialized(object sender, EventArgs e)
{
ESRI.ArcGIS.Client.FeatureLayer myFeatureLayerDockPhotos2011 = null;
myFeatureLayerDockPhotos2011 = (ESRI.ArcGIS.Client.FeatureLayer)Map.Layers["FeatureLayerResDockPhotos2011"];
// You can control the visibility of which WMS layers are displayed by adding the
// sub-LayerID's to the String Array.
string[] myVisibleFeatureLayers = { "FeatureLayerResDockPhotos2011" };
myFeatureLayerDockPhotos2011 = myVisibleFeatureLayers;
}
... View more
03-27-2014
07:16 AM
|
0
|
1
|
2176
|
POST
|
Just Put your Server IP instead of server name and it will work. http://[Server[/url] IP]/ntcorp/StructuresPhotos/001 - UNLICENCED [PID 017-587-166].bmp Thank you! I will give this a try.
... View more
03-26-2014
07:05 AM
|
0
|
0
|
500
|
POST
|
Hi Dominique, I looked through the document you linked and see that there are some restrictions on Images. I don't fully understand all of what the document is saying, and I'm not sure if I have an issue with this. The images are located on a different server that is not a web server but should be accessible by the web map (this is our first time trying the Image class). All the servers are part of our internal network and this web map is on our intranet. I've set up the HyperlinkButton so that clicking the photo opens the full size photo in a new browser window. This part works, it is the Image that isn't populating within the maptip as a preview. I am able to populate the image tag with a random one I pulled off the internet from UCAYA (http://labs.ucaya.com/ucaya.png) I'm not understanding why this one works, but mine don't? Thanks
... View more
03-25-2014
12:40 PM
|
0
|
0
|
500
|
POST
|
Hi cc4ever, my filepaths look something like \\CORPNAS\ntcorp\StructuresPhotos\001 - UNLICENCED [PID 017-587-166].bmp These are contained in a text field in the gdb table. It's baffling as clicking on a spot where the photo should be brings up the photo in a new window, indicating there aren't any problems with the paths or anything. Thanks
... View more
03-25-2014
09:53 AM
|
0
|
0
|
500
|
POST
|
I've added the following code for a hyperlink button within the maptip: <HyperlinkButton TargetName="_blank" NavigateUri="{Binding [FILEPATH]}">
<HyperlinkButton.Content>
<Image Source="{Binding [FILEPATH]}" Width="100" Height="100" />
</HyperlinkButton.Content>
</HyperlinkButton> This still isn't showing the image, but it does open the image in a new browser tab when clicked within the 100 x 100px box where the image should be... Any clues out there?
... View more
03-24-2014
11:39 AM
|
0
|
0
|
500
|
POST
|
Hi, I would like a Maptip to popup that contains some text and an image. I have the maptip popping up on hover with the text from the PHOTODATE field, but the image does not show and I'm not sure why. I've tried jpeg, png, and bmp, none work (the images in the FILEPATH field are jpegs). I can't even get an image to show up when not trying to retrieve it from a field value. Any help is greatly appreciated. My code: <esri:FeatureLayer ID="FeatureLayerResDockPhotos2011"
Url="SOME URL"
Where="1=1"
OutFields="PHOTODATE,FILEPATH">
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource menuBorder}">
<Border.Effect>
<DropShadowEffect Color="Black" Direction="-45"
BlurRadius="20" Opacity=".75" />
</Border.Effect>
<StackPanel Margin="7">
<TextBlock Text="{Binding [PHOTODATE]}" FontWeight="Bold"
Foreground="White" />
<Image Source="{Binding [FILEPATH]}" Height="150"
Width="150" />
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
<esri:FeatureLayer.Clusterer>
<esri:FlareClusterer
FlareBackground="#99FF0000"
FlareForeground="White"
MaximumFlareCount="9" />
</esri:FeatureLayer.Clusterer>
</esri:FeatureLayer>
... View more
03-21-2014
10:36 AM
|
0
|
8
|
911
|
POST
|
Hi, We are trying to make use of the Web Adaptor so that we can secure some of the services on our site. If I change the path of any of the services in the xaml to the new location the web adaptor has placed them, Visual Studio throws a 4004 - ManagedRunTimeError Message: System.Security.SecurityException ...etc. etc. We have the crossdomain.xml and clientaccesspolicy.xml files at the root directory, and both allow open access (*). Is there somewhere else these files should be copied to, considering the Web Adaptor? Thanks in advance if anyone can help.
... View more
01-27-2014
11:47 AM
|
0
|
0
|
497
|
IDEA
|
-->
I think it would be great if you could force abbreviations using Maplex, rather than simply having the labels abbreviated only when space is a concern. This would be useful when labeling streets - my dataset may have "Road", "Street" etc. spelled out fully but the only way for me to standardize everything to "Rd", "St" etc. is to actually edit the data. Would love if I could use my trusty abbreviation dictionary to force all abbreviations.
... View more
01-16-2014
08:27 AM
|
7
|
2
|
780
|
POST
|
Hi Lauren, there are a LOT of .mxd's to go through. In the 2003 folder alone, there are 300...and we have a folder for every year from 2001 until now. I can handle checking into a particular .mxd wherever it fails, if that's necessary, but ideally I'd like to set up a test to skip over any tableViews. If I take out the following code: if brknItem.supports("dataSource"):
f.write(", " + brknItem.dataSource + "\n") And add writing the dataSource back in with the full path and item name, the script will write the paths for the tableView items fine. So I need to find a way to skip this test if the dataset is a tableView, but I don't know the syntax. Pseudocode would be something like: If broken item is a tableView, write dataSource else if brokenItem.supports("dataSource") write dataSource The issue now is the brokenItem.supports test throws an error if the dataset is a tableView. This makes sense, as a tableView does support dataSource so why would you test for it, right?
... View more
08-09-2013
09:57 AM
|
0
|
0
|
474
|
POST
|
Another update: after more testing, I think it must have been a corrupted .mxd that happened to have an empty data frame that was causing the issue. I do still have trouble with standalone tables though. The error seems to suggest that you can't even test on this data type to see if it supports the dataSource property: Traceback (most recent call last): File "X:\Documents\Working Files\Broken Data Sources\ListBrokenDataSources.py", line 24, in <module> if brknItem.supports("dataSource"): AttributeError: 'TableView' object has no attribute 'supports'
... View more
08-09-2013
08:19 AM
|
0
|
0
|
474
|
POST
|
Hi Stacy, after some more testing I've found some things are causing issues: empty data frames, and standalone tables. Both cause the script to throw an error. I am certain that in the one folder I was doing testing on, the script was inconsistently stopping at different places. It's very strange indeed. This folder had an .mxd with no data/layers on it - once I found and deleted that, my script runs beautifully. So my issue now is how to test for empty data frames and standalone tables, and to skip over those items.
... View more
08-09-2013
07:56 AM
|
0
|
0
|
474
|
POST
|
Hi Stacy, thanks for your detailed response. Something very odd is happening indeed, because I noticed after I get the error message and the script seems to be just hanging there (tried waiting 1/2 an hour and saw no additions to my csv file), I close the script and after I've closed it there are several more .mxd's that appear in the csv file. I'm wondering if that's the reason it's not "stopping" on the same .mxd every time - it looks to me like it's crashed, but it's actually still running? I'm going to try running it overnight and see what's there in the morning. I had the script running with no errors before adding in the dataSource or workspacePath. It's definitely something about that which is causing problems. I'll go through and simplify again, as per your suggestions, and see if I can narrow it down to any particular .mxd. The addMessage didn't print anything to the idle window. I also noticed I had that unused lyr line in there - forgot to remove that. Some data types (ie. annotation feature classes) won't return a dataSource, and apparently an error will be thrown if you don't test them out first. Lauren, thanks for the tip on workspacePath - I'll stick with this then. Eventually I want to repair the broken links, I'm trying to find out what/where they are first so I can figure out the paths to where the data has moved to. Our folder system was totally reorganized a few years back and I want to archive all these old .mxd's by creating map packages. Do you know if workspacePath is also better to use on layer files than dataSource? I have pretty much the same script which runs on all the layer files in a directory, not getting any errors with that one. UPDATE: I managed to isolate an .mxd, and when I checked into it, there was no data in it. No layers, just an empty data frame. This doesn't explain why sometimes the script would go past this point, or stop several .mxd's before this point? One time it even ran through every .mxd in the directory, though it still showed the error. Anyway I've deleted the offending .mxd and will try and find a way to identify an .mxd with no layers in it. I'd like to print this to my csv file as well. Thanks all for your help!
... View more
08-08-2013
06:57 AM
|
0
|
10
|
1198
|
POST
|
Hi Stacy, I added this one line but it seems to have had no effect. I'm not familiar with addMessage; should there have been a popup or something? You mentioned printing the mxd path but I don't see where the results of addMessage should be added to my csv file or printed in IDLE? I've checked the .mxd's that aren't getting looped through; they open fine and seem to be "valid" so far as I can tell.
... View more
08-07-2013
02:22 PM
|
0
|
0
|
1198
|
POST
|
Hi Lauren, thanks for your answer. I'm actually successful at creating and populating the csv file, it just hangs up near the end of cycling through all the mxd's and doesn't finish the job. It puts out a csv file just fine, with the majority of the broken links listed, it just doesn't make it through every mxd in the folder and I'm not sure what the error I'm being given means. I notice you used "workspacePath" rather than "dataSource". I tested out your code in IDLE and it seems to be providing the same information as dataSource. I changed dataSource to workspacePath in my code and tested that out. Both using your code as a straight copy and paste into IDLE, and changing dataSource to workspacePath in my own code, I'm getting the exact same error as I have been. Oddly, it does NOT stop at the same .mxd in both scenarios. Any clues out there???
... View more
08-07-2013
02:02 PM
|
0
|
0
|
1198
|
Title | Kudos | Posted |
---|---|---|
1 | 03-09-2016 10:46 AM | |
1 | 01-21-2016 10:04 AM | |
1 | 06-23-2015 10:58 AM | |
1 | 01-19-2016 11:19 AM | |
1 | 08-10-2016 02:06 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|