POST
|
Any thoughts or similar experiences are appreciated! 🙂 This proxypage stuff is really brand new to me.
... View more
07-26-2011
09:48 AM
|
0
|
0
|
340
|
POST
|
Hey Dave, thank you. I will debug that file and see what I can get. I also need to add another thing that I find out. Under such condition: the proxyurl is included in the xaml and I get web error when I use the find tool. If I zoom in/out after the map is initialized and then I use the find tool, there won't be any error. That's the other part confused me very much. It looks like after the map initialization, I must firstly do something with the extent, then I won't get any error.
... View more
07-26-2011
09:02 AM
|
0
|
0
|
340
|
POST
|
Hi guys, I am using proxypage to avoid the cross-domain issue to save images from multiple map services. In proxypage:
<serverItem url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services"
matchAll="true" />
In xaml:
<esri:ArcGISDynamicMapServiceLayer ID="Images"
Url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services/ecocat_images/MapServer" Visible ="False"
Initialized="ArcGISDynamicMapServiceLayer1_Initialized" InitializationFailed="AGS1_failed" ProxyURL="../proxy.ashx"/>
<esri:ArcGISDynamicMapServiceLayer ID="Visible Layers"
Url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services/wirt/MapServer"
Initialized="ArcGISDynamicMapServiceLayer_Initialized" InitializationFailed="AGS_failed" ProxyURL="../proxy.ashx"/>
I implement a GoTo tool which is using a textbox to accept a zip code and then zoom into that area (this is a find task), in the meanwhile, turn three layers (from the 'Visible Layers') visible and also turn the 'Images' map service to be visible. Then I found a confusing issue. If I include the ProxyURL in the above two map services (red words), once I enter the zip code and click the button to do the work, I get a web error. I attache the error from fiddler [ATTACH]7914[/ATTACH]. The three layers and another map service cannot be turn visible. If I don't include the ProxyURL, I will not get this error and three layers and another map service can be turn visible. I am thinking the error may result from the proxy that I use. But I do need to use the proxypage to save the map images from multiple services .... Anyone run into similar issue or any thoughts on how to solve this issue? Thank you advance!
... View more
07-25-2011
12:48 PM
|
0
|
3
|
844
|
POST
|
Thank you Chris! That is very kind of you to share the methods and the codes. In the two methods, Object ID is the alias name and objectid is the field name right? I would like to generate the columns in the code-behind, instead of in the xaml. The columns' names are not fixed and they are totally dependent on the layer find task is working on. That's why I need to generate the columns in code-behind. Any thoughts on how to do that in code-behind?
... View more
07-25-2011
12:29 PM
|
0
|
0
|
293
|
POST
|
HI guys, I am trying to implement such tool: the user could type something in the textbox, then in the button click event, results containing what the user inputs are returned in a datagrid. Firstly, I was using the query method. Similar to this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryWithoutMap I use a textbox to get what the user inputs and then give this string value to one of the query's property: query.text. In esri's sl api page, it says: Text:Shorthand for a literal search text on the display field, equivalent to: where <displayField> like '%%'. The text is case sensitive. This parameter is ignored if the where parameter is specified. You can determine what the display field is for a layer using the ArcGIS Services Directory. So that means the user needs to type in something only belongs to the display field, otherwise, it won't return any feature found. Then I tried the find task, similar to this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Find By using this method, it can find similar string with the user input from all of the fields(or you can specify some fields). But I also found some shortcommings: 1. The results can only be returned as Alias name&Value (a pair), which means Field name cannot be returned and without it the datagrid cannot be binded to the correct values. (datagrid must be binded to the field name to get the correct values, not alias name) 2. There is only one field name seems receivable, which is the first field that the user's input string is included in. For example, the user types "ch" and in layer 1, there are 4 fields contain "ch" similar data. Only the first field's name and it's alias can be get. Just like what is used in the second sample: <slData:DataGridTextColumn Binding="{Binding Path=FoundFieldName}" Header="Found Field Name" />. FoundFieldName is the alias name and DisplayFieldName is the field name. So that means only one field's value will be binded to the datagrid, due to the alias name & field name issue.... I am not sure whether my understanding about the find result is correct. Appreciate any experience or any suggestion on how to handle this issue!
... View more
07-22-2011
02:30 PM
|
0
|
4
|
2062
|
POST
|
Hi Lance, If I understand your question correctly, you could assign simplerender to the symbol you use in the graphicslayer. Here is how I did in my application: In xaml:
<Grid.Resources>
<esri:FillSymbol x:Key="ResultsFillSymbol" Fill="#880000FF">
<esri:SimpleRenderer x:Key="selectPolygonSymbolRender" Symbol="{StaticResource ResultsFillSymbol}"/>
</Grid.Resources>
In Code-behind:
GraphicsLayer graphicsLayer = MyMap.Layers["Selection Results"] as GraphicsLayer;
graphicsLayer.Renderer = LayoutRoot.Resources["selectPolygonSymbolRender"] as SimpleRenderer;
foreach (Graphic feature in featureSet.Features)
{
feature.Symbol = LayoutRoot.Resources["ResultsFillSymbol"] as FillSymbol;
graphicsLayer.Graphics.Insert(0, feature);
}
You also need to modify the layerids property of the legend control in code-behind:
if (!MyLegend.LayerIDs.Contains("Selection Results"))
{
legendIDcount++;
MyLegend.LayerIDs.SetValue("Selection Results", legendIDcount);
}
//legendIDcount is a global variable defined in the beginning.
Make sure to leave the place for the new graphicslayer. If you don't put a, b,c,d in the layerids property, it looks like new id couldn't be added. In Xaml:
<esri:Legend x:Name="MyLegend" Map="{Binding ElementName=MyMap}" Grid.Row="2" Background="#FFFFFFCC" BorderBrush="#FFFFFFCC" HorizontalAlignment="Left" Margin="3,3" Width="260"
LayerItemsMode="Flat" ShowOnlyVisibleLayers="True" LayerIDs="Visible Layers,a,b,c,d">
Hope this helps.
... View more
07-22-2011
02:16 PM
|
0
|
0
|
153
|
POST
|
Hi guys, I am using the infowindow tookiet in my application. MyMap is located in Grid.row = 4 and grid.column = 1. If I put the infowindow in the same row and column, it opens in a different location from what I just click on the map after I zooming in or out the map (See the picture, I click on the red point). [ATTACH]7845[/ATTACH]
<esri:InfoWindow x:Name="ecocatParcelinfoWindow" Grid.Row="4" Grid.Column="1"
Padding="2"
CornerRadius="2"
Map="{Binding ElementName=MyMap}"
ContentTemplate="{StaticResource EcocatParcelInfoWindowTemplate}"/>
If I don't specify row and column in the infowindow, the position is correct, but it seems like only the first row is displayed..[ATTACH]7846[/ATTACH]. This is very weird...Any thoughts or ideas on how to fix it? Thanks advance!
... View more
07-19-2011
01:23 PM
|
0
|
5
|
1598
|
POST
|
because you are modifying Map.Layer property which was created at the UI thread. You can fix this by creating a static property Token and instead do Token = e.Result. When you are ready to create an instance of your layer, set layer.Token = Token. Hey Jennifer, thanks for the tips. I was testing this recently with many ways, but haven't get it work 😞 Let me describe more about my issue. I have several map services in http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services, like A, B, C and D (all of them currently are not secured.). I have three level users set in ArcGIS Server, such as i, j and k. i, j and k can all use A and B service. j and k can both use C service, but not for i. only k can use D service. So my questions are: 1. How should I set different security to different service? If I use different tokens, I should generate different tokens for each of four services. But how should I do to let all three levels users can use A and B, since a token is generated with single username&password? 2. I tired to use the SLProxyPage (http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Secure_services/016600000022000000/). If I add the following lines:
<serverItem url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services"
matchAll="true" username="i" password="iii"/>
And use it in xaml (This is service A)
<esri:ArcGISDynamicMapServiceLayer ID="Visible Layers"
Url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services/wirt/MapServer"
Initialized="ArcGISDynamicMapServiceLayer_Initialized" InitializationFailed="AGS_failed" ProxyURL="../proxy.ashx" />
But that still means only user i can use service A, then how about user j and k? Sorry...my questions are many...I am totally a brand new in this security issue....I really don't know how to do this...:( I only know in the beginning I need a logon window to get the user' name and passoword(maybe use a childwindow)
... View more
06-27-2011
10:01 PM
|
0
|
0
|
180
|
POST
|
You can use the standard SaveFileDialog provided by Silverlight. Note that for security reason, the SaveFileDialog can only be shown in response to an user initiated event (a button should be OK then). Hey Dominique, thanks a lot for the answer. I just went through the codes. I am thinking to add a button just beside the 'Print' button, named 'Save'. But I didn't find where I can specify the command to open a SaveFileDialog. I saw the 'Print' button is binded to a print command, but I didn't find where it is specified to open standard Windows PrintDialog. Could you share some guidance? Thank you very much!
... View more
06-27-2011
09:54 AM
|
0
|
0
|
496
|
POST
|
Hey Dominique, thank you for the advice. I still get this issue unfixed. But the user seems to want to omit this scale stuff. So shifted my attention to implement other functions. I notice in the printing sample, the print button opens a standard Windows Print Dialog. So can I have another button similar to this one to open a standard windows SaveFile dialog?
... View more
06-24-2011
02:45 PM
|
0
|
0
|
496
|
POST
|
Hi everyone, I want to use a button click event to save MyMap directly without open windows SaveFileDialog. MyMap contains the following kinds of layer: two ArcGIS Server dynamic map services a few graphics layers a few feature layers I am totally brand new on this task... and I really don't know where I should start. So I really appreciate any thoughts, work flow or sample code on how to implement this. Thanks again! 🙂
... View more
06-24-2011
01:41 PM
|
0
|
1
|
668
|
POST
|
Hi Morten, thank your for the advices. I just checked the info. So four layers need maptips. They have 2000, 4337, 488, 1273 features, separately. Each layer only needs to display 1-3 fields in the maptip. 1. I remove the dropshadow effect for the maptip and the performance gets better. 2. I remove the featurelayer with maptip and the performance gets better. You mentioned "server-side rendering". That means I should probably publish a feature service (like this: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/FeatureServer) How should I do to implement maptip in the server side? In addition, I do have like 15 graphicslayer for different usage in my application and I put all of them in the xaml. I assign them to graphicslayer when I use them. If this will slow down the performance, then how should I do to render them in the server-side? Thank you!
GraphicsLayer wirtBufferGraphicslayer = MyMap.Layers["MyWirtBufferGraphicsLayer"] as GraphicsLayer;
... View more
06-24-2011
10:41 AM
|
0
|
0
|
215
|
POST
|
Hi everyone, I have four featurelayers with maptip just like below and I found that the response time of the application seems been slowed down. Plus, sometimes the maptip doesn't stay on the map and sometimes it stays even my mouse has moved to other places, and it may not display the maptip. I guess these all result from the low response time. So does maptip slow down the performance? Or I lost some critical things in my codes? Thank you! 🙂
<esri:FeatureLayer ID ="EcocatParcelMaptip" Url="http://rmms-dev.atlas.illinois.edu/ArcGIS/rest/services/ecocatparcels_new/MapServer/0" Visible ="False"
OutFields ="PROJCODE" >
<!--<esri:FeatureLayer.OutFields>
<sys:String>PROJCODE</sys:String>
</esri:FeatureLayer.OutFields>-->
<esri:FeatureLayer.MapTip>
<Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5" CornerRadius="10" BorderBrush="#FF222957" BorderThickness="3" Margin="0,0,15,15">
<Border.Background>
<LinearGradientBrush EndPoint="1.038,1.136" StartPoint="0.015,0.188">
<GradientStop Color="#FFD1DFF2"/>
<GradientStop Color="#FF092959" Offset="0.946"/>
</LinearGradientBrush>
</Border.Background>
<Border.Effect>
<DropShadowEffect ShadowDepth="10" BlurRadius="14" Direction="300" />
</Border.Effect>
<StackPanel Orientation="Vertical" Margin="20,15,20,15">
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
<TextBlock Text="PROJCODE : " FontWeight="Bold" Foreground="#FF0F274E" FontSize="12" />
<TextBlock Text="{Binding [PROJCODE]}" Foreground="#FFFFFFFF" FontSize="12" FontStyle="Italic" FontFamily="Portable User Interface" />
</StackPanel>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
... View more
06-23-2011
12:37 PM
|
0
|
4
|
389
|
POST
|
Hey Doc, I really really want to try this sample code. But I still cannot add the ProNet.dll to the reference...(I can only add it from XX.Web --Reference--Add reference) I assume you must successfully added it. Could you share your ProNet.dll file? I am going to give another shot to add it. Thanks a lot! 🙂 My email is shirleydd@gmail.com
... View more
06-22-2011
01:59 PM
|
0
|
0
|
98
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|