|
POST
|
Thank you for your post. We are aware of this issue in VisualStudio Design. Here's the work around, before you drag the elements to your Design, add a reference to this .NET assembly System.Windows.Controls.Data.Input.
... View more
10-27-2010
08:08 AM
|
0
|
0
|
598
|
|
POST
|
You need to parse the text file, create a PointCollection of MapPoints based on the (lat, lon) values. This PointCollection will be added to the ring(s) of your Polygon, which will become the Graphic's Geometry.
PointCollection pts = new PointCollection();
// replace these points with the proper values
pts.Add(new MapPoint(-35,51));
pts.Add(new MapPoint(-36,80));
Polygon p = new Polygon();
p.Rings.Add(pts);
Graphic g = new Graphic() { Geometry = p };
... View more
10-26-2010
04:38 PM
|
0
|
0
|
742
|
|
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
|
372
|
|
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
|
670
|
|
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
|
1108
|
|
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
|
418
|
|
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
|
1133
|
|
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
|
969
|
|
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
|
553
|
|
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
|
1358
|
|
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
|
1768
|
|
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
|
635
|
|
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
|
1358
|
|
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
|
1768
|
|
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
|
1940
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 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 |
2 weeks ago
|