POST
|
Hi, I have a feature layer. I need to enable multiple feature selection with mouse drag (similar to Editor widget, but I don't have any editing needs). Upon the selection, I need to query the selected features using query task. Can anybody suggest what is the best way to do it? Currently the user has to click each feature to select multiple features and query them altogether. But I want to have the user draw a freehand area and select all features within it. Please share ideas or resources. Thanks. Does anybody have any suggestion on this? I really need some pointers. I hope my explanation makes sense. I am trying to mention it again: I want to select multiple features/graphics on a feature layer with a mouse drag (i.e. drawing a rectangle or area). Upon selection the graphics will be highlighted. Then I want to pass these selected features/graphics to QueryTask to query them for further processing. Please help. Thanks.
... View more
10-31-2011
08:30 AM
|
0
|
0
|
185
|
POST
|
Hi, I have a feature layer. I need to enable multiple feature selection with mouse drag (similar to Editor widget, but I don't have any editing needs). Upon the selection, I need to query the selected features using query task. Can anybody suggest what is the best way to do it? Currently the user has to click each feature to select multiple features and query them altogether. But I want to have the user draw a freehand area and select all features within it. Please share ideas or resources. Thanks.
... View more
10-27-2011
03:10 PM
|
0
|
2
|
2069
|
POST
|
You can use UniqueValueRenderer and add an Attribute that will detect which symbol it needs to pick up. Instead of setting graphic.Symbol, you can set graphic.Attribute. Here's an example of how UniqueValueRenderer is used in GraphicsLayer. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#RenderersXAML. By moving your symbols to a renderer, Legend control should be able to use the symbol and label assigned on the renderer. Hi, Thank you both for your help. I have resolved my problem as per Jennifer's method. It was lot simpler than I expected. Thanks a bunch.
... View more
10-24-2011
06:27 AM
|
0
|
0
|
352
|
POST
|
You can set GraphicsLayer.Renderer and Legend control will pick up the symbol. For example:
<!--Under Resources-->
<esri:SimpleRenderer x:Key="MyRenderer" Label="Red Symbol">
<esri:SimpleRenderer.Symbol>
<esri:SimpleMarkerSymbol Color="Red" Size="6" Style="Diamond" />
</esri:SimpleRenderer.Symbol>
</esri:SimpleRenderer>
<!--more code goes here-->
<esri:GraphicsLayer ID="CitiesGraphicsLayer" Renderer="{StaticResource MyRenderer}"/>
Hi Jenni, Thanks for your reply. But it's bit different in my case. I cannot really use any renderer for the graphics layer because I do not have a single renderer. The marker symbols are being added to the graphics layer in run-time(from code behind) for each result feature depending on some logic. So what I am doing is: foreach(Graphic resultFeature in featureSet.Features) { if(somecondition) { resultFeature.Symbol = LayoutRoot.Resources["Non_Detect"] as Symbol; // Non-Detect is one of my custom marker symbols defined under resources <!--more code goes here--> graphicsLayer.Graphics.Add(resultFeature); } } Now with all these marker symbols I want to create the legend-like control to explain the symbols. So it will be a list-like panel that will list all the symbols shown on the map layer with their respective explanation. My difficulty is to bind the marker symbols on this panel. Also I need to know if it is possible to do this in code-behind so that I can include only those symbols that appear on the map layer on the legend control. Hope I was able to explain the scenario...
... View more
10-19-2011
11:47 AM
|
0
|
0
|
352
|
POST
|
Hi, I have several ESRI markersymbols showed on a map layer. Now I want to create a "legend/TOC" like control with the marker symbols and their representative text on it. I don't have a symbol attribute served by the map service, so I really can't use the SymbolDisplay property of the toolkit . My symbols are my marker symbols. How can I achieve this? I was planning to create a user control to show my legend-like control. But how can I bind my marker symbols on it? Please share your idea and provide any code-snippet if possible. Thanks. Suhartha
... View more
10-19-2011
08:50 AM
|
0
|
5
|
1051
|
POST
|
You need to synchronize by yourself the graphics selection and the datagrid selection. There is a sample here : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery Hi dbroux, Tahnk a lot for your reply. I have tried your example, but it does not work for me... 😞 Not sure what I am doing wrong. During debugging I found that, my datagrid.selectedItem is getting the reference to the selected feature layer graphic. But ScrollIntoView() is not responding for some reason... the mouse over/selected graphic is not highlighted in the datagrid. here's my method (Same as in the example): private void FeatureLayer_MouseEnter(object sender, GraphicMouseEventArgs e) { view_KMDataGrid.Focus(); view_KMDataGrid.SelectedItem = e.Graphic; view_KMDataGrid.CurrentColumn = view_KMDataGrid.Columns[0]; //view_KMDataGrid.UpdateLayout(); // tried this too... didn't work view_KMDataGrid.ScrollIntoView(view_KMDataGrid.SelectedItem,view_KMDataGrid.CurrentColumn); } Please help what I am doing wrong.. Thanks for helping.
... View more
09-28-2011
08:44 AM
|
0
|
0
|
165
|
POST
|
Hi, I have a datagrid bound to a domain data source. The data grid is populated through a RIA domain service. The feature layer is a map service which is as below: <esri:FeatureLayer ID="MyFeatureLayer" Url="XXX/MapServer/0" OutFields="OBJECTID, SYS_LOC_CO, X_COORD, Y_COORD, Location, Loc_type" Renderer="{StaticResource MySimplePointRenderer}" DisableClientCaching ="True" MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"> My question is, is it possible to highlight the corrresponding row of the datagrid when the user clicks a graphic on the map? I know it is possible to do so when the datagrid is tied to the feature layer as in this example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataGrid But how do I do the same in my case?
... View more
09-27-2011
02:08 PM
|
0
|
3
|
1782
|
POST
|
Hi, Did you ever get it solved? I am having the same problem with my script in ArcGIS 9.3.1. My script to export the mxd to PNG exports everything else on the map doc except a tiff logo. As you mentioned on the first post, ArcMap does export the logo fine when the export is done through ArcMap. My script is as follows (some relevant code): Set pExporter = New ExportPNG With pExporter .PixelBounds = pPixelEnv .Resolution = lngOutputResolution .ExportFileName = sFullPathName End With ' device coordinates origin is upper left, ypositive is down With tExpRect .Left = pExporter.PixelBounds.LowerLeft.x .bottom = pExporter.PixelBounds.UpperRight.y .Right = pExporter.PixelBounds.UpperRight.x .Top = pExporter.PixelBounds.LowerLeft.y End With ' export the map hdc = pExporter.StartExporting Set pAV = pPageLayout pAV.Output hdc, lngOutputResolution, tExpRect, Nothing, Nothing DoEvents pExporter.FinishExporting I am not sure if I am missing any required parameters. Please help since I am really lost in this.
... View more
09-23-2011
11:48 AM
|
0
|
0
|
475
|
POST
|
You can look at the XAML code in this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryRelatedRecords to bind to the attributes. You can set ItemsSource in code or in XAML, I believe it is something like this: ItemsSource="{Binding Graphics}" DataContext="{Binding ElementName=MyMap, Path=Layers[MyLayerId]}". If you are using FeatureDataGrid, this is a good example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureDataGrid Hi Jennifer, Thanks a lot for your reply. sorry for the delay. I need to make myself clearer: my datagrid is already bound to a domain data source to fetch data from a SQL table: <sdk: DataGrid ItemsSource="{Binding ElementName=view_KMDomainDataSource, Path=Data}" x:Name="view_KMDataGrid" ...> In this case, how can I bind the datagrid to the map layer?? So the scenario is- the datagrid is populated with the query result. Also the feature layer has feature graphics that are related to the query. Now clicking on a feature shoould take me to corresponding datagrid row. Please help and any suggestion will be appreciated. Thanks. Suhartha
... View more
07-21-2011
09:48 AM
|
0
|
0
|
361
|
POST
|
Hi, I have a feature layer cosuming a map service and a Datagrid which is bound to a domain data source. Executing a Linq query populates the datagrid. Now I want to bind this datagrid to my feature layer so that clicking on the map feature will highlight corresponding datagrid row. How can I do this? I have one datagrid field that can tie the datagrid with a corresponding feature layer attribute. any helpful link/ suggestion will be much appreciated. Thanks for helping me. Suhartha
... View more
07-15-2011
11:05 AM
|
0
|
7
|
2877
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|