|
POST
|
The Previous and Next Extents are not enabled until you actually change your map extent by panning/zooming. If you use the live sample, you can check that as soon as you pan/zoom, Previous extent becomes enabled and you can navigate between the previous and next extents. So, they both function, it is just that they are both initially disabled since there are no extents to navigate to just yet.
... View more
09-29-2010
11:58 AM
|
0
|
0
|
1621
|
|
POST
|
When you say you are unable to query your feature layer - does your query ever get completed? Can you also subscribe to failed event? Can you also check that the parameters you set when performing the query through the browser (outside SL) are the same parameters you set in your SL app?
queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted;
queryTask.Failed += QueryTask_Failed;
As far as limitation in the number of records returned by a service; the default is 500 for ArcGIS Server 9.3.1, 1000 for ArcGIS Server 10, 1000 for MapIt... as mentioned here:http://help.arcgis.com/en/webapi/silverlight/help/creating_featurelayer.htm
... View more
09-29-2010
11:49 AM
|
0
|
0
|
615
|
|
POST
|
I'm assuming you already looked at this sample for MeasureAction:http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#UtilityActions In addition to this sample, you can add the code I posted below. It is already in C#.
... View more
09-28-2010
05:46 PM
|
0
|
0
|
2027
|
|
POST
|
You must be referring to MeasureAction. The GraphicsLayer that contains the polygon used for Measure is added to the map once Measure is started and removed from the map once Measure has completed. If you need this polygon to stay in your map, you need to create your own GraphicsLayer and add a copy of this polygon to your GraphicsLayer. Maybe do something like the following: Note, however, that this code will be executed everytime a new layer is added to your map. You might need to tweak this to handle when you subscribe/unsubscribe to Graphics.CollectionChanged event. Xaml-code:
<esri:Map x:Name="MyMap">
<esri:ArcGISTiledMapServiceLayer ID="MyBaseLayer"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />
<esri:GraphicsLayer ID="MyGraphicsLayer"/>
</esri:Map>
Code-behind:
this.MyMap.Layers.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Layers_CollectionChanged);
}
void Layers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
{
foreach(var item in e.NewItems)
if(item is GraphicsLayer)
(item as GraphicsLayer).Graphics.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Graphics_CollectionChanged);
}
}
void Graphics_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
{
GraphicsLayer graphicsLayer = this.MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
if (graphicsLayer != null)
{
foreach (var item in e.NewItems)
{
if (item is Graphic)
{
Graphic g = item as Graphic;
graphicsLayer.Graphics.Add(new Graphic() { Geometry = g.Geometry, Symbol = g.Symbol });
}
}
}
}
}
... View more
09-28-2010
01:36 PM
|
0
|
0
|
2027
|
|
POST
|
Kindly refer to this forum post:http://forums.arcgis.com/threads/11131-Using-Templates-from-the-Template-Gallery
... View more
09-28-2010
06:37 AM
|
0
|
0
|
530
|
|
POST
|
In the SpatialQuery example, the query task is created and executed after MyDrawSurface_DrawComplete. If you would like to do the same in the LayerSelection example, you will need to tap into the Editor's EditCompleted event. You also may want to use FeatureDataGrid using featureLayer.SelectedGraphics as its FilterSource.
public MainPage()
{
InitializeComponent();
Editor editor = this.LayoutRoot.Resources["MyEditor"] as Editor;
if (editor!=null)
editor.EditCompleted += new EventHandler<Editor.EditEventArgs>(editor_EditCompleted);
}
void editor_EditCompleted(object sender, Editor.EditEventArgs e)
{
if (e.Action == Editor.EditAction.Select)
{
foreach (var edit in e.Edits)
{
if (edit.Layer is FeatureLayer)
{
FeatureLayer featureLayer = edit.Layer as FeatureLayer;
//TODO: display featureLayer.SelectedGraphics in a grid.
}
}
}
}
... View more
09-27-2010
10:38 AM
|
0
|
0
|
583
|
|
POST
|
Do you change your map cursor after GeoprocessorTask_GetResultDataCompleted? Or does it remain on System.Windows.Input.Cursors.Wait?
... View more
09-27-2010
10:17 AM
|
0
|
0
|
2365
|
|
POST
|
You can use the following code, where mapPoint is the point geometry you want to zoom to. MyMap.ZoomToResolution(MyMap.Resolution / MyMap.ZoomFactor, mapPoint);
... View more
09-27-2010
10:10 AM
|
0
|
0
|
2791
|
|
POST
|
Please look at Morten's response in this post:http://forums.arcgis.com/threads/13386-Changing-ArcGISTiledMapServiceLayer-(in-a-different-spatial-reference)-at-runtime
... View more
09-23-2010
02:59 AM
|
0
|
0
|
382
|
|
POST
|
You can use the 3rd parameter userToken of ProjectAsync like so: _geometryService.ProjectAsync(new List<Graphic>() { projectedGraphic }, new SpatialReference(4326), projectedGraphic); and in the Completed event, you can retrieve graphic with attributes through the UserState: void geometryService_ProjectCompleted(object sender, GraphicsEventArgs e) { Graphic projectedGraphic = e.UserState as Graphic; // TODO: complete project completed logic here. }
... View more
09-23-2010
02:50 AM
|
0
|
0
|
1099
|
|
POST
|
Thank you for your post. We just found out after reproducing your issue that we currently do not support editing vertices of an Envelope geometry (or Rectangle). However, this is something we might look into after 2.1.
... View more
09-22-2010
03:03 PM
|
0
|
0
|
1010
|
|
POST
|
There is no support for moving multiple graphics at once.
... View more
09-22-2010
02:47 PM
|
0
|
0
|
345
|
|
POST
|
Using the same SDK sample link that you provided, I added the following: Under Grid.Resources: <esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}"/> And inserted this before the Grid closes: <Button Content="EditVertices" HorizontalAlignment="Center" VerticalAlignment="Center" DataContext="{StaticResource MyEditor}" Command="{Binding EditVertices}" CommandParameter="{x:Null}"/> I'm able to Move/Edit geometry using EditVertices command. I do notice that if you added a rectangle, you're only allowed to move the graphic. If you added a polygon, you should be able to edit the vertices of the graphic.
... View more
09-22-2010
11:56 AM
|
0
|
0
|
1010
|
|
POST
|
All the Editor commands should also work on your GraphicsLayer provided that this layer belongs to the Map, has a specified ID and is not excluded in the LayerIDs property. And yes, you need to set GeometryServiceUrl in order to perform Cut, Reshape, Union, AutoComplete Add, and AutoSelect. For EditVertices, make sure CommandParameter is set to null.
... View more
09-22-2010
06:50 AM
|
0
|
0
|
1010
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-11-2025 01:30 PM | |
| 1 | 06-06-2025 10:14 AM | |
| 1 | 03-17-2025 09:47 AM | |
| 1 | 07-24-2024 07:32 AM | |
| 1 | 04-05-2024 06:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-12-2026
09:38 AM
|