|
POST
|
Are you referring to this sample? http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Identify If yes, you can clear the graphics layer by doing the following:
GraphicsLayer layer = this.MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
if (layer != null)
layer.Graphics.Clear(); // or layer.ClearGraphics();
where "MyGraphicsLayer" is the ID of the layer whose graphics you need to clear. Also to ensure that IdentifyTask is no longer performed on MouseClick, you can either * unsubscribe to this event so succeeding MouseClicks do not perform an IdentifyTask, or this.MyMap.MouseClick -= QueryPoint_MouseClick; * use a private boolean to denote if IdentifyTask need to be created and check if that is true/false before performing an IdentifyTask. bool identifyTaskEnabled = false; //set to true/false private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e) { if (!identifyTaskEnabled ) return; // to skip the code that follows ... //IdentifyTask code goes here }
... View more
10-04-2010
04:03 PM
|
0
|
0
|
900
|
|
POST
|
You don't need to set ItemSouce in XAML anymore, if you are already creating the binding in code-behind. This should be enough to set the ItemSource. combo.SetBinding(ComboBox.ItemsSourceProperty, resultFeaturesBinding) However, you need to define the ItemTemplate for your combobox. Note that this is case-sensitive and should match the field you are binding to.
<ComboBox x:Name="combo" Width="200">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding TRACT}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
... View more
10-04-2010
03:49 PM
|
0
|
0
|
457
|
|
POST
|
This seems to be a limitation on WPF Browser Application as discussed in this link http://www.netframeworkdev.com/windows-presentation-foundation-wpf/problem-with-popup-bakground-in-xbap-application-77838.shtml I tried creating a popup outside our API and followed the suggestion of setting AllowsTransparency to False and explicitly setting a Background. However, when Background is set to {x:Null} or Transparent, the background remains black. It only accepted Background when set to "White" or other colors.
<Grid>
<ToggleButton x:Name="ShowPopup" Content="ShowPopup" VerticalAlignment="Top" HorizontalAlignment="Center"/>
<Popup AllowsTransparency="False" PlacementTarget="{Binding ElementName=ShowPopup}" Placement="Relative" IsOpen="{Binding ElementName=ShowPopup, Path=IsChecked}" Opened="Popup_Opened">
<Popup.Child>
<Border Background="{x:Null}">
<TextBlock Text="Test"/>
</Border>
</Popup.Child>
</Popup>
</Grid>
Due to this limitation, we also cannot support it at this time.
... View more
10-04-2010
03:03 PM
|
0
|
0
|
1298
|
|
POST
|
I think you are referring to one of the bugs we fixed for 2.1. But just to clarify, are you using Editor or EditorWidget to make your selection? What Mode is your layer set? When you make your selection and it fails to unselect features, could it be because no new selection is made on that specific layer? To answer your question though -there are several events you can tap into to find out if new features are selected (i.e. layer's PropertyChanged event where e.PropertyName == "SelectedGraphics" or "SelectionCount", editor's EditCompleted event where e.Action == Editor.EditAction.Select). At any point, you can iterate through the Graphics to verify that the graphic's Selected property is set to true/false. If you need to unselect the graphic, you can do either: graphic.Selected = false or graphic.UnSelect(). There is no need to change the Renderer for this purpose. Setting SelectionColor property on the layer only dictates how the feature will be displayed when selected. It would be great if you can give us more information on how to reproduce the issue so we can determine if this is the bug we fixed or if it is separate. Let us know the steps you've taken when you find that features are supposed to be deselected but they are not. Thank you.
... View more
10-04-2010
02:04 PM
|
0
|
0
|
431
|
|
POST
|
I cannot reproduce this. Do you mind sharing more information? Maybe a screenshot? I'm using the sample from our SDK http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ShowCoordinatesBehavior and tried it with SL4, WPF4, and WPF3.5 projects, and none of them have a Background set to Black (kindly see attached image). By default ShowCoordinatesBehavior template has 2 TextBlocks (one with Black Foreground and the other with White Foreground that appears like an outline). This template does not set Background property and it also cannot be modified.
... View more
10-04-2010
01:09 PM
|
0
|
0
|
1298
|
|
POST
|
You did not do anything wrong. If you also subscribe to Initialized event, you will also notice that the ArcGISDynamicMapServiceLayer went through the initialization process, thereby setting IsInitialized property to true. This property only tells you that the layer has attempted to initialize. If there were any error during this stage, the layer's InitializationFailure will not be null. You can test this by setting an invalid URL.
... View more
10-04-2010
01:02 PM
|
0
|
0
|
1074
|
|
POST
|
You may want to visit the following forum posts: http://forums.arcgis.com/threads/11825-Change-map-contrast-brightness http://forums.arcgis.com/threads/6470-Opacity-on-a-Layer-level-vs-Service-Level
... View more
10-04-2010
12:16 PM
|
0
|
0
|
505
|
|
POST
|
You say that the NullRef exception occurs in this line, right? ArcGISTiledMapServiceLayer arcgisLayer = _Parent.MyMap.Layers["AGOLayer"] as ArcGISTiledMapServiceLayer; Can you check if _Parent is not null? I don't see _Parent defined in your XAML. It's best to check this while debugging. Check also that none of these values are null: _Parent.MyMap _Parent.MyMap.Layers _Parent.MyMap.Layers contains a layer with ID "AGOLayer" and _Parent.MyMap.Layers["AGOLayer"] is ArcGISTiledMapServiceLayer
... View more
10-04-2010
11:40 AM
|
0
|
0
|
999
|
|
POST
|
Oh right. Thank you for your post. This bug is fixed in version 2.1.
... View more
10-04-2010
11:31 AM
|
0
|
0
|
1060
|
|
POST
|
You are right. Thank you for your post. This is a bug.
... View more
10-02-2010
03:10 PM
|
0
|
0
|
438
|
|
POST
|
In a FeatureLayer Update() will re-query the data underlying your feature layer. If layer or table contents have changed on the server, you can call this method to see changes in the feature layer on the client. Note, you may need to disable client caching. You are right, selections and unsaved edits will be lost on Update. Refresh() on dynamic layer will re-draw the layer at the current view/extent.
... View more
10-02-2010
02:45 PM
|
0
|
0
|
1491
|
|
POST
|
What are you trying to do, always rotate by 90 degrees? Setting Rotation="90" is for the initial map rotation.
... View more
10-02-2010
02:30 PM
|
0
|
0
|
1060
|
|
POST
|
You just need to some pieces in your code: In XAML, change MouseClick="QueryPoint_MouseClick" to MouseRightButtonDown="QueryPoint_MouseClick" In code-behind, change private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e) { ESRI.ArcGIS.Client.Geometry.MapPoint clickPoint = e.MapPoint; to private void QueryPoint_MouseClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { e.Handled = true; // to get rid of the default "Silverlight" Context Menu. ESRI.ArcGIS.Client.Geometry.MapPoint clickPoint = this.MyMap.ScreenToMap(e.GetPosition(MyMap)); rest of the code can stay the same.
... View more
10-02-2010
02:21 PM
|
0
|
0
|
1754
|
|
POST
|
If you can submit geoprocessing task outside your SL app and still get the same odd behavior of the task completing successfully without applying the supposed updates, you might get better response from ArcGIS Desktop team. I can only guess that there's something wrong with the model you published or maybe the input parameters were incorrect but you say that task completes successfully too so it's really hard to guess. Do you also subscribe to Failed event? You can also use Fiddler to see what requests/response are exchanged between the browser and your service.
... View more
10-02-2010
02:00 PM
|
0
|
0
|
401
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week 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 |
Monday
|