|
POST
|
This is not a bug, it is difficult if not impossible to be able to query by point with exact precision. (Point selection against exact Point geometry in the layer). This is a related thread: http://forums.arcgis.com/threads/4611-Find-closest-point
... View more
10-26-2010
04:26 PM
|
0
|
0
|
356
|
|
POST
|
All the buttons have Command binding which can only be resolved if their DataContext is resolved. In this sample, each button's DataContext is set to an Editor which is part of Resources. Each of these editors has their Map property bound to a map, using Element binding. Since you are moving this to a different UserControl that does not contain your map, Element binding will not work. You need to resort to other means of binding. Maybe create your own DependencyProperty (Map) in the UserControl so that you can use this instead.
... View more
10-26-2010
04:14 PM
|
0
|
0
|
633
|
|
POST
|
Please look at this related thread: http://forums.arcgis.com/threads/15157-Access-ScaleBars-Current-Value Post #4, you can update this style.
... View more
10-26-2010
04:03 PM
|
0
|
0
|
1074
|
|
POST
|
Sure, please visit this link: http://help.arcgis.com/en/webapi/silverlight/help/Getting_Started.htm
... View more
10-26-2010
04:01 PM
|
0
|
0
|
402
|
|
POST
|
I'm not sure I understand the question. What label are you talking about and where do you expect this to show on the FeatureLayer? Can you explain using sampleserver? This is a FeatureService that can be used for FeatureLayer (http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/FeatureServer/0) This is the corresponding MapService that can be used in ArcGISDynamicMapServiceLayer (http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/MapServer)
... View more
10-26-2010
03:59 PM
|
0
|
0
|
1107
|
|
POST
|
Sure. Please look at this related thread:http://forums.arcgis.com/threads/14328-Extending-Editor-Widget
... View more
10-26-2010
03:55 PM
|
0
|
0
|
939
|
|
POST
|
Thank you for reporting this. We'll try to get it fixed in the future releases.
... View more
10-26-2010
03:47 PM
|
0
|
0
|
537
|
|
POST
|
Before adding the graphic to your target layer. You do need to add attributes to your graphic as Ali suggested.
FeatureLayer target = this.MyMap.Layers["TargetLayer"] as FeatureLayer;
Graphic graphic = new Graphic() { Geometry = feature.Geometry };
foreach (var field in target.LayerInfo.Fields)
graphic.Attributes.Add(field.Name, null);
target.Graphics.Add(graphic);
I was using this as my target layer: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2 Notice, that the FeatureDataForm uses the proper control depending on the field type and the same validation check applies.
... View more
10-25-2010
05:06 PM
|
0
|
0
|
1299
|
|
POST
|
I think what you need to do is to create an envelope around the MapPoint of your interest and call ZoomTo(). This seems like the more appropriate method for your intention. I had zoomTarget pointing to Providence Hospital and zoomTarget2 pointing to Walsh College.
<esri:MapPoint x:Key="ZoomTarget" X="13351704.337736" Y="361346.969451659" />
<esri:MapPoint x:Key="ZoomTarget2" X="13368513.3490549" Y="359874.084252657" />
private void ZoomIn_Click(object sender, RoutedEventArgs e)
{
MyMap.ZoomTo(ZoomToPoint(zoomTarget));
}
private void ZoomOut_Click(object sender, RoutedEventArgs e)
{
MyMap.ZoomTo(ZoomToPoint(zoomTarget2));
}
private Envelope ZoomToPoint(MapPoint p)
{
return new Envelope(p.X - 500, p.Y - 500, p.X + 500, p.Y + 500);
}
... View more
10-25-2010
10:10 AM
|
0
|
0
|
1703
|
|
POST
|
Thank you for reporting this. It will be fix for the 2.1 release.
... View more
10-25-2010
07:14 AM
|
0
|
0
|
618
|
|
POST
|
Does your FeatureLayer have OutFields? The FeatureDataForm determines what fields to show based on this.
... View more
10-25-2010
07:11 AM
|
0
|
0
|
1299
|
|
POST
|
I tried to replicate this but in my sample, I zoom in and out of a fixed point for simplicity. I used the map service you provided and also tried with another service that uses WKID. The code that were commented out are for the service with WKID spatial reference - this zooms to Hawaii. The current code uses your service with WKT spatial reference - this zooms to Providence Hospital. XAML
<Grid x:Name="LayoutRoot" Background="White">
<Grid.Resources>
<!--<esri:MapPoint x:Key="ZoomTarget" X="-156.57540169918" Y="20.7720205689867"/>-->
<esri:MapPoint x:Key="ZoomTarget" X="13351704.337736" Y="361346.969451659" />
</Grid.Resources>
<esri:Map x:Name="MyMap" ExtentChanged="MyMap_ExtentChanged">
<!--<esri:ArcGISDynamicMapServiceLayer Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer"/>-->
<esri:ArcGISDynamicMapServiceLayer Url="http://maps.cityofnovi.org/ArcGIS/rest/services/Publish/QuickSearchLayers/MapServer" />
</esri:Map>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" >
<TextBlock x:Name="MapResolution"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Zoom Target: "/>
<TextBlock Text="{Binding Source={StaticResource ZoomTarget}}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="ZoomIn" Click="ZoomIn_Click" Content="Zoom In"/>
<Button x:Name="ZoomOut" Click="ZoomOut_Click" Content="Zoom Out"/>
</StackPanel>
</StackPanel>
</Grid>
Code-behind:
public MainPage()
{
InitializeComponent();
zoomTarget = this.LayoutRoot.Resources["ZoomTarget"] as MapPoint;
}
MapPoint zoomTarget;
private void ZoomIn_Click(object sender, RoutedEventArgs e)
{
MyMap.ZoomToResolution(MyMap.Resolution / 4, zoomTarget);
}
private void ZoomOut_Click(object sender, RoutedEventArgs e)
{
MyMap.ZoomToResolution(MyMap.Resolution * 4, zoomTarget);
}
private void MyMap_ExtentChanged(object sender, ExtentEventArgs e)
{
MapResolution.Text = string.Format("Map Resolution: {0}", MyMap.Resolution);
}
... View more
10-23-2010
09:46 PM
|
0
|
0
|
1703
|
|
POST
|
These are the changes I would make to the Area and Perimeter sample, if you were to use the Editor. XAML-code: (Under Grid.Resources)
<esri:Editor x:Key="MyEditor" EditCompleted="Editor_EditCompleted" Map="{Binding ElementName=MyMap}" LayerIDs="MyGraphicsLayer"/>
(Somewhere in the Grid)
<Button x:Name="AddBtn" Content="Add" DataContext="{StaticResource MyEditor}" Command="{Binding Add}" CommandParameter="{StaticResource DefaultFillSymbol}"/>
In the code-behind, make geometryService a private member. Remove code that uses Draw and code that adds to your GraphicsLayer. You won't need them since the Editor Add will do that for you and it will correct the polygon no matter what direction you have drawn it. Use this instead:
GeometryService geometryService;
private void Editor_EditCompleted(object sender, Editor.EditEventArgs e)
{
if (e.Action == Editor.EditAction.Add)
{
foreach (var edit in e.Edits)
{
geometryService.AreasAndLengthsAsync(new List<Graphic>(){edit.Graphic});
break;
}
}
}
Also, move this code to the constructor:
geometryService =
new GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
geometryService.AreasAndLengthsCompleted += GeometryService_AreasAndLengthsCompleted;
geometryService.Failed += GeometryService_Failed;
... View more
10-23-2010
08:09 PM
|
0
|
0
|
1883
|
|
POST
|
I ran Fiddler while running our SDK sample on Area and Perimeter and I was able to reproduce the negative Area by drawing the polygon in counter-clockwise direction. This is without any change to the code. When I drew the polygon in clockwise direction, the Area I get is correct. The best way to avoid incorrect values for Area is to call SimplifyAsync() on the Geometry after draw is complete before calling AreaAndLengthAsync(). You can also try to draw in clockwise direction and you should see the difference in values. This is the link to the Simply sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Simplify Another option is to use the Editor's Add instead of the Draw object, this will ensure that the polygon is simplified before adding to your layer. Look at the Add Polygon button in this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave If you will be using this approach on GraphicsLayer, the CommandParameter need to be set to the polygon symbol, the GraphicsLayer need to have its ID property set, the button's DataContext need to be set to an Editor with Map property bound to the map that contains this GraphicsLayer, and LayerIDs property set to the ID of the GraphicsLayer that will contain the polygon.
... View more
10-23-2010
07:28 PM
|
0
|
0
|
3083
|
|
POST
|
This is related thread: http://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget (see post #9) to wire up to TemplatePicker's Editor.EditCompleted event.
... View more
10-22-2010
11:43 AM
|
0
|
0
|
2020
|
| 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
|