|
POST
|
This can happen if the Spatial reference of your map is not the same as the Spatial reference of your cached service. Happens often with a map containing 2 cached services using different SR. Is it your case?
... View more
09-26-2012
01:57 AM
|
0
|
0
|
644
|
|
POST
|
We wanted to add some padding to the Extents to the Collection of Graphics Once you get the extent of your graphics, you can also use the Envelope Expand method. Nothing wrong in your code though.
... View more
09-26-2012
01:53 AM
|
0
|
0
|
659
|
|
POST
|
I am using ESRI.ArcGIS.Client.Geometry. Geodesic.Area method ,when the parameter Polygon has more than one rings,the method throw an exception " Index was out of range - Must be non-negative and less than the size of the collection. Parameter name: index". I am unable to reproduce that issue. Could you share a repro case or give more info on how to reproduce the issue? Thanks
... View more
09-25-2012
05:17 AM
|
0
|
0
|
1004
|
|
POST
|
It seems you forgot to set Handled to true in the MouseLeftButtonDown handler, hence the standard event managment (i.e pan) gets actived. private void GraphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e) { e.Handled = true; if (e.Graphic.Geometry is MapPoint) { e.Graphic.Selected = true; selectedPointGraphic = e.Graphic; } else { editGeometry.StartEdit(e.Graphic); } }
... View more
09-24-2012
04:46 AM
|
0
|
0
|
926
|
|
POST
|
Your custom renderer looks good but it seems the symbols are not always updated when the selection changes. The workaround may be to wire up an handler to FeatureLayer.PropertyChanged event and to refresh the layer in that handler:
private void FeatureLayer_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "SelectedGraphics")
((GraphicsLayer) sender).Refresh();
} And you no more need to send an event whe the symbol changes:
set{
_sym = value;
//NotifyPropertyChanged("sym");
}
... View more
09-24-2012
02:00 AM
|
0
|
0
|
1589
|
|
POST
|
Old templates were using the ScaleBar inside the Navigator custom control. Check your Navigator Style. Check also that app.xaml or generic.xaml doesn't still reference the old scalebar.
... View more
09-24-2012
12:30 AM
|
0
|
0
|
1520
|
|
POST
|
I guess there is an issue becasue PanTo and ZoomTo are asynchronous functions (with animations), so executing bothh in // may be an issue. Here is an example of function panning and zooming with only one call: private void centerAndZoom(ESRI.ArcGIS.Client.Map map, ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint, double resolution)
{
double ratio = 1.0;
if (map.Resolution != 0.0)
ratio = resolution / map.Resolution;
if (ratio == 1.0)
map.PanTo(mapPoint);
else
{
ESRI.ArcGIS.Client.Geometry.MapPoint mapCenter = map.Extent.GetCenter();
double X = (mapPoint.X - ratio * mapCenter.X) / (1 - ratio);
double Y = (mapPoint.Y - ratio * mapCenter.Y) / (1 - ratio);
map.ZoomToResolution(resolution, new ESRI.ArcGIS.Client.Geometry.MapPoint(X, Y));
}
} Note : it's using Map.Resolution but might easily be adpated to use Map.Scale.
... View more
09-24-2012
12:17 AM
|
0
|
0
|
891
|
|
POST
|
if (featureLayer.HasEdits) featureLayer.Update(); You should call SaveEdits instead of Update. Update reloads graphics at client side by taking care of changes that may have been done at server side. It's not saving anything at server side.
... View more
09-24-2012
12:11 AM
|
0
|
0
|
871
|
|
POST
|
I did not see a navigation.cs file at all. there is a SLProject/Styles/NavigationStyle.XAML with no code behind. the link above talks extensively about Navigation.cs - i did see the link making this post last week. Navigator.cs is not part of the core API but is provided by some templates such as Minimal or Glass templates that subclass the Navigation toolkit control. If you create a new map application from one of these templates you'll see the file under toolkit\navigator.
... View more
09-20-2012
09:57 AM
|
0
|
0
|
842
|
|
POST
|
I'm using all. You have to use the 'visible' option (not all) : LayerOption = LayerOption.visible, With 'all', all layers are identifiable.
... View more
09-20-2012
08:30 AM
|
0
|
0
|
3065
|
|
POST
|
LayerOption = LayerOption.all, You have to use the visible option.
... View more
09-20-2012
08:23 AM
|
0
|
0
|
3065
|
|
POST
|
Yes. I didn't read the example carefully enough. I made that changed and used the ID from xaml, but now I'm getting a NullReferenceException on this part. foreach (int x in EMDataLayer.VisibleLayers) identifyParams.LayerIds.Add(x); VisibleLayers can be null if you never changed the sublayer visibilities. In this case the default sublayer visibilities are used. So code like : if (EMDataLayer.VisibleLayers != null)
foreach (int x in EMDataLayer.VisibleLayers)
identifyParams.LayerIds.Add(x);
should work.
... View more
09-20-2012
07:40 AM
|
0
|
0
|
3065
|
|
POST
|
In essence, all I need to have is a single input parameter (Address). You can use the 'Full address' field of the address locator. In the REST API this field is called 'Simple Line Input', so code like : Dictionary<string, string> address = addressParams.Address;
address.Add("Single Line Input", "400 Market Street, San Francisco, CA, 94111");
_locatorTask.AddressToLocationsAsync(addressParams);
returns the expected location. Hope that helps.
... View more
09-20-2012
07:26 AM
|
0
|
0
|
1390
|
|
POST
|
Well I just made an attempt to try to force radio buttons into the legend (see code below) and got the following error: Line: 56 Error: Unhandled Error in Silverlight Application Code: 4004 Category: ManagedRuntimeError Message: System.ArgumentException: Service URL does not contain any layer. at ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e) at ESRI.ArcGIS.Client.Layer.Initialize() at ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer.<>n__FabricatedMethod16() at ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer.<>c__DisplayClass14.<MapServiceInfoInitFailed>b__12() Looks like there is a mismatch in your layerName. Your radio button is called : ElementarySchoolAttendanceAreas <RadioButton x:Name="ElementarySchoolAttendanceAreas" Your layer name is supposed to have the same name, i.e ElementarySchoolAttendanceAreas string serviceName = tickedCheckBox.Name; ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer dynamicServiceLayer = MyMap.Layers[serviceName] as ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer; But your layer is called : Attendance Areas <esri:ArcGISDynamicMapServiceLayer ID="Attendance Areas" --> dynamicServiceLayer is null and you get the exception on : dynamicServiceLayer.VisibleLayers = new int[] { layerIndex };
... View more
09-20-2012
07:07 AM
|
0
|
0
|
2385
|
|
POST
|
ESRI.ArcGIS.Client.Toolkit.MapTip mapTip = new ESRI.ArcGIS.Client.Toolkit.MapTip(); mapTip.GraphicsLayer = mapTipLayer; mapTip.Title = "Some content"; mapTipLayer.MapTip = mapTip; To get maptips, you can either use the maptip control or set the maptip property of the layer. But don't do both. Removing the latest line of your code shoudl work: ESRI.ArcGIS.Client.Toolkit.MapTip mapTip = new ESRI.ArcGIS.Client.Toolkit.MapTip(); mapTip.GraphicsLayer = mapTipLayer; mapTip.Title = "Some content"; ///mapTipLayer.MapTip = mapTip;[/CODE]
... View more
09-20-2012
07:00 AM
|
0
|
0
|
896
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|