|
POST
|
You might also want to post your question to Microsoft forums: http://social.msdn.microsoft.com/Forums/en/vsdebug/threads. They may be able to help or users in that forum may have experienced the same thing.
... View more
03-24-2012
04:03 PM
|
0
|
0
|
1909
|
|
POST
|
Is the FeatureLayer.AutoSave=False? By default AutoSave=True so any changes you make on the layer is committed on the server unless you specify AutoSave=False. I've slightly modified this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataForm. By setting AutoSave=False and adding the following ComboBox. Instead of relyling on FeatureLayer.MouseLeftButtonDown, I use ComboBox.SelectionChanged event to update FeatureDataForm.GraphicSource. <ComboBox VerticalAlignment="Top" HorizontalAlignment="Center" SelectionChanged="ComboBox_SelectionChanged"
ItemsSource="{Binding ElementName=MyMap, Path=Layers[PointLayer].Graphics}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Attributes[objectid]}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox> private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var graphic = (sender as ComboBox).SelectedItem as Graphic;
var layer = MyFeatureDataForm.FeatureLayer;
foreach (var g in layer.Graphics)
if (g.Selected) g.UnSelect();
graphic.Select();
MyFeatureDataForm.GraphicSource = graphic;
FeatureDataFormBorder.Visibility = Visibility.Visible;
}
... View more
03-24-2012
04:00 PM
|
0
|
0
|
452
|
|
POST
|
You can add highlighted line in the MapLayerTemplate of this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LegendWithTemplates
<esri:Legend.MapLayerTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox Content="{Binding Label}"
IsChecked="{Binding IsEnabled, Mode=TwoWay}"
IsEnabled="{Binding IsInScaleRange}" >
</CheckBox>
<Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" />
<Button Content="Zoom" Click="Button_Click" Tag="{Binding Layer.FullExtent}"/>
</StackPanel>
</DataTemplate>
</esri:Legend.MapLayerTemplate>
private void Button_Click(object sender, RoutedEventArgs e)
{
var extent = (sender as Button).Tag as Envelope;
MyMap.ZoomTo(extent);
}
... View more
03-24-2012
03:48 PM
|
0
|
0
|
2711
|
|
POST
|
You can refer to this thread for some quick sample: http://forums.arcgis.com/threads/46920-Migrating-Toolbars-to-2.3.
... View more
03-24-2012
03:32 PM
|
0
|
0
|
584
|
|
POST
|
What version of the API are you using? I could not reproduce with the following code. I have a button click to remove layer from my map.
MyMap.Layers.CollectionChanged += (a, b) =>
{
//breakpoint here
};
}
private void Button_Click(object sender, RoutedEventArgs e)
{
MyMap.Layers.RemoveAt(MyMap.Layers.Count -1);
}
... View more
03-24-2012
03:25 PM
|
0
|
0
|
1102
|
|
POST
|
Please refer to post# 2 in this thread: http://forums.arcgis.com/threads/44168-Adding-a-point-to-a-featurelayer-using-coordinates. You can add attributes to the graphic before adding it to the layer. You can also use FeatureDataForm as in this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataForm. EditorWidget use the same control and show it in a ChildWindow. If you were to use EditorWidget/TemplatePicker to add the graphic, there is ShowAttributesOnAdd property that you can set to True. Whenever you add a new feature, a FeatureDataForm is displayed. As seen in this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitEditorWidget
... View more
03-24-2012
03:22 PM
|
0
|
0
|
887
|
|
POST
|
<Grid x:Name="LayoutRoot" Background="White">
<esri:Map x:Name="MyMap" WrapAround="True" >
<esri:ArcGISTiledMapServiceLayer
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:FeatureLayer ID="SF311" Url="http://servicesbeta2.esri.com/arcgis/rest/services/SF311/FeatureServer/0"
MinimumResolution="3.5895263819922" MaximumResolution="117.2893181475264"
Mode="OnDemand" DisableClientCaching="True"/>
</esri:Map>
<TextBlock Text="{Binding ElementName=MyMap, Path=Resolution}" VerticalAlignment="Top" HorizontalAlignment="Center"/>
</Grid>
Try the code above. Minimum/MaximumResolution had been set on the layer. When you zoom in to San Francisco area and the MaximumResolution is hit, the layer becomes visible and as you zoom in more and the MinimumResolution is hit, the layer becomes invisible again. Map's resolution is displayed in the TextBlock to guide you.
... View more
03-24-2012
03:11 PM
|
0
|
0
|
1900
|
|
POST
|
You can follow the steps from this blog post: http://blogs.esri.com/esri/arcgis/2010/05/20/use-control-templates-to-customize-the-look-and-feel-of-arcgis-controls/ to create a style for FeatureDataGrid. You can update the style by setting IsChecked property of AutoChangeMapExtentCheckBox.
<CheckBox x:Name="AutoChangeMapExtentCheckBox" Content="Auto Zoom to Selected" Margin="10,5" IsChecked="True"/>
... View more
03-24-2012
02:49 PM
|
0
|
0
|
370
|
|
POST
|
You can disable draw (draw.IsEnabled=false) on Map.LostFocus and enable draw (draw.IsEnabled=true) on Map.GotFocus. Draw subscribes to these mouse events when activated.
... View more
03-16-2012
03:33 PM
|
0
|
0
|
643
|
|
POST
|
You may use a GraphicsLayer on top of your layer with only one graphic with MapPoint geometry that follows the polygon's first vertex.
... View more
03-14-2012
02:31 PM
|
0
|
0
|
1175
|
|
POST
|
It's seems impossible to move the graphic geometry back to its original location to cause a cancel. But based on the stack trace, the OriginalGeometry raised a GeometryChanged event that it was updated outside the EditGeometry. This may have been caused by changing the geometry in code (application): If you add/remove/update PointCollection or X/Y values. Or it may also be caused by existing bug that is triggered by cloning geometries. We have a fix for this in our next release.
... View more
03-14-2012
02:29 PM
|
0
|
0
|
3166
|
|
POST
|
The following concept page might help: http://help.arcgis.com/en/webapi/silverlight/help/index.html#//016600000015000000 Selection only�??Does not initially request any features. Features are added only when a selection is made. Selection only mode is useful when you cannot or do not want to bring all features into the client, but you want to highlight one or more features for a certain reason. In most cases, this mode is used in conjunction with a dynamic map service layer to display the location of selected features. In the following SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerSelection, ArcGISDynamicMapServiceLayer shows an image of where the features are. Using selection tools, we run a query against the feature service and bring them to client FeatureLayer. They only get added to the layer upon selection. Thus, making it look like you are highlighting from ArcGISDynamicMapServiceLayer. The FeatureLayer in this sample use YellowRenderer to differentiate features that are on the layer from features that only exist on server.
... View more
03-14-2012
01:09 PM
|
0
|
0
|
519
|
|
POST
|
Thank you for reporting this bug. I have created a work item for this. We'll try to get it fixed in future releases of the API.
... View more
03-14-2012
12:56 PM
|
0
|
2
|
2384
|
|
POST
|
You might get a response from this forum, kindly post here: http://forums.arcgis.com/forums/102-Network-Analyst
... View more
03-14-2012
12:51 PM
|
0
|
0
|
1211
|
|
POST
|
You can look at this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Simplify. After Draw completes, you will need to Simplify to make it topologically correct before you can send it to Union. Alternatively, you can use Editor.Add (which will simplify after draw is complete) and Editor.Union: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave. This does not require much code from you, just create a button that points to an Editor with Map and GeometryServiceUrl set, you can then bind button command with Add or Union.
... View more
03-13-2012
12:28 PM
|
0
|
0
|
636
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 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 |
3 weeks ago
|