|
POST
|
Map and Layer property in your code use DependencyProperty that sets Map and Layer of the OverviewMap contro? (similar to code below) I do not get error when I have the following code in OtherWindow.xaml.cs
public Map Map
{
get { return (Map)GetValue(MapProperty); }
set { SetValue(MapProperty, value); }
}
public static readonly DependencyProperty MapProperty = DependencyProperty.Register("Map", typeof(Map), typeof(OtherWindow), new PropertyMetadata(OnMapPropertyChanged));
private static void OnMapPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
OtherWindow ow = d as OtherWindow;
if (ow != null && e.NewValue is Map)
ow.MyOverviewMap.Map = e.NewValue as Map;
}
public Layer Layer
{
get { return (Layer)GetValue(LayerProperty); }
set { SetValue(LayerProperty, value); }
}
public static readonly DependencyProperty LayerProperty = DependencyProperty.Register("Layer", typeof(Layer), typeof(OtherWindow), new PropertyMetadata(OnLayerPropertyChanged));
private static void OnLayerPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
OtherWindow ow = d as OtherWindow;
if (ow != null && e.NewValue is Layer)
ow.MyOverviewMap.Layer = e.NewValue as Layer;
}
In MainWindow.xaml.cs
private void Window_Loaded(object sender, RoutedEventArgs e)
{
OtherWindow ow = new OtherWindow()
{
Map = this.MyMap,
Layer = new ArcGISTiledMapServiceLayer()
{
Url = (this.MyMap.Layers[0] as ArcGISTiledMapServiceLayer).Url
}
};
ow.Show();
... View more
02-14-2011
10:40 AM
|
0
|
0
|
1976
|
|
POST
|
I'm not sure I know how to replicate the issue so you have two different windows, one with your map and one with OverviewMap? How does OverviewMap set its Map property? I suspect the problem here is with
<esri:OverviewMap x:Name="MyOverviewMap" Map="{Binding ElementName=MyMap}">
Element binding will not work if MyMap exists in a different window. For the window that will hold OverviewMap control, you may need to create a Map DependencyProperty for the OverviewMap control to use.
... View more
02-14-2011
09:58 AM
|
0
|
0
|
1976
|
|
POST
|
You may be able to use VisualTreeHelper with your ControlTemplate as described in this silverlight forum: http://forums.silverlight.net/forums/p/115213/262980.aspx
... View more
02-14-2011
09:54 AM
|
0
|
0
|
1570
|
|
POST
|
#1 - The error you are seeing is from the service. {"error":{"code":400,"message":"Unable to complete Buffer operation.","details":["An error occured while buffering geometry. Unable to complete the operation.","The coordinates or measures are out of bounds."]}} You may need to call Simplify and use the simplified geometry instead. #2 - I could not replicate the crashing when using this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery I get results whether the polygon I create has hole in it or not. For both cases, GeometryService and QueryTask, you can subscribe and handle Failed events. Also, to ensure that you are sending a valid geometry for your query, call Simplify on it first. Here's an example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Simplify
... View more
02-14-2011
09:45 AM
|
0
|
0
|
606
|
|
POST
|
Ideally, you will set OutFields before the layer gets Initialized and UpdateCompleted. If you will be showing all fields "*", it should be sufficient to do this upfront when you create the FeatureLayer. Do you intend to change OutFields at runtime? Like maybe fewer fields showing in FeatureDataForm initially and then later have all fields show? I'm not sure what you are attempting to do here. If any of the query parameters on the layer changes (like Where, OutFields), you will need to call Update() for these changes to take effect.
... View more
02-14-2011
09:26 AM
|
0
|
0
|
2429
|
|
POST
|
I see, I thought Incidents is a number. Group.Sum(Function(p) p.Incident)...Is this calling a Function? If Incidents was a number, you can use anonymous function to retrieve this property and get its total. Group.Sum(Function(p) CInt(p.Attributes["Incident"])) You can OrderBy Officer and iterate through the sorted results while incrementing a count for each officer. But the best thing to do is learn and explore how to use Linq before you can decide which operation best fits your need because I can advise you something that only make sense for me but may not really work with your data 😛
... View more
02-14-2011
09:16 AM
|
0
|
0
|
2092
|
|
POST
|
FeatureDataForm's EditEnded event fires before FeatureLayer's EndSaveEdits. The changes made in the layer need to be pushed to the server before you can re-query the service. You can call Update() in EndSaveEdits eventhandler but also know that any change on the layer cause your application to re-query the service which is expensive. You can maybe use a boolean to flag whether the attribute that was changed need to call update.
... View more
02-14-2011
08:52 AM
|
0
|
0
|
772
|
|
POST
|
You can subscribe to Initialized and InitializedFailed events, check to see if layer's InitializationFailure is null or if an error had occured. Here's a good blog post on how to troubleshoot a blank map: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx
... View more
02-14-2011
08:38 AM
|
0
|
0
|
2275
|
|
POST
|
You can subscribe to Map's Progress event: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Map~Progress_EV.html
... View more
02-14-2011
08:35 AM
|
0
|
0
|
1084
|
|
POST
|
The Legend control will pick up the symbols based on whatever renderer you have selected to use. If you don't need to distinguish between types or classes, you can use SimpleRenderer. This sample use the 3 types of Renderer (Simple, UniqueValue, ClassBreaks):http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#RenderersXAML. You can add this piece of code to see what the Legend control will display for these types of Renderer:
<esri:Legend Map="{Binding ElementName=MyMap}" VerticalAlignment="Top" HorizontalAlignment="Right" />
You may also create and use your own Renderer that implements IRenderer.
... View more
02-14-2011
08:32 AM
|
0
|
0
|
1452
|
|
POST
|
The following are acceptable syntax for setting OutFields in code-behind, you can use one or the other as long as OutFields was not previously set to null.
FeatureLayer l = new FeatureLayer() { Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer/0" };
l.OutFields = new OutFields() { "incident_number", "description" }; //1- new instance with field names
l.OutFields.Add("*");//or 2- add field name or '*' to existing instance
... View more
02-14-2011
07:38 AM
|
0
|
0
|
2429
|
|
POST
|
You should still be able to use a FeatureLayer to hold data from your table. You can use FeatureDataGrid or FeatureDataForm to display the attributes from this table.
... View more
02-13-2011
12:05 PM
|
0
|
0
|
398
|
|
POST
|
The IndexOutofRangeException here means the RouteTask has completed with an empty result, index 0 was not accessible. It's hard to tell were it may have failed but if you try to run Fiddler with your application, you might be able to see the web requests. Check the parameters sent with your request and try to see if making this request through your web browser can yield to the same empty result.
... View more
02-13-2011
11:57 AM
|
0
|
0
|
704
|
|
POST
|
I'm not sure whether you found answers already. If not, here's a link to configuring token service. It seems you can leverage existing Windows user accounts. http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//0093000000q5000000.htm. Also, here's an example of retrieving token from a given user credentials: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2010/02/15/How-to-use-secure-ArcGIS-Server-services.aspx. If you are using WPF API v2.1, layers have Credentials property. You should be able to re-use the same Credentials. If you are using Silverlight, your web browser handles user authentication.
... View more
02-13-2011
11:48 AM
|
0
|
0
|
553
|
|
POST
|
If you want to save edits explicitly, you need to set AutoSave on the FeatureLayer to False. http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~AutoSave.html. The following documentation explains SaveEdits, Update and Refresh: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~Update.html http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~SaveEdits.html http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.GraphicsLayer~Refresh.html
... View more
02-11-2011
01:40 PM
|
0
|
0
|
772
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-10-2026 12:13 PM | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
07-13-2026
09:07 AM
|