|
POST
|
The new graphic must be checked if it intersects with a certain other shape. We created a webservice for this functionality. So the check is no problem. But if the check say "editing on this place is not allowed" I would like to cancel the edit. Do you perform this check prior to calling SaveEdits? If the issue is with adding new graphics, I assume you use the TemplatePicker within the EditorWidget. You need to get this from EditorWidgetStyle (use Expression Blend "EditTemplate"). Get the Editors from their DataContext and on the EditCompleted event, check that when an Add occurs or EditVertices occurs, they intersect the shape (as you mentioned in your requirements), if the new graphic fails this test, do not call SaveEdits. Jennifer
... View more
08-06-2010
07:03 AM
|
0
|
0
|
852
|
|
POST
|
There is no sample for this yet because the SL/WPF API does not expose the Editor's ActiveEditor property, which you might need to achieve this. You can however, listen to the Editor's EditorActivated and EditCompleted events to know when the Editor is active and which EditAction has completed. Or you can also listen to the button's Click and IsEnabledChanged events. Either way, in the event handler, you can change your image or button's appearance accordingly. Jennifer
... View more
08-05-2010
05:33 PM
|
0
|
0
|
1262
|
|
POST
|
Does it mean that the FeatureLayer will use the symbol it uses in ArcMap? Yes, if the rest endpoint created by your published service contains a renderer, this will be picked up by the SL/WPF API. For example: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/FeatureServer/0 This FeatureLayer includes a Unique Value Renderer (see Drawing Info). For more information on what is new to the ArcGIS 10 Rest API, you can visit this link:http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/index.html Jennifer
... View more
08-05-2010
10:17 AM
|
0
|
0
|
836
|
|
POST
|
When using SL Toolkit Theme, does it put your map inside a ScrollViewer? This is not supported, since the scrollviewer intercepts the mouse events needed for panning. Jennifer
... View more
08-05-2010
09:16 AM
|
0
|
0
|
483
|
|
POST
|
I don't see anything wrong with your code-behind. It looks similar to the sample. Maybe let VS create the Eventhandler for you by doing locatorTask += and then tab, see if this is any different to the LocatorTask_AddressToLocationsCompleted() you have. If this does not work, can you also share your XAML code? Jennifer
... View more
08-05-2010
09:10 AM
|
0
|
0
|
716
|
|
POST
|
You can set the layer's AutoSave property to false. Get the Editors from the EditorWidget's and TemplatePicker's DataContext. Note that these two editors are separate, you can get the TemplatePicker using Expression Blend "Edit Template" on EditorWidget. When you have both editors, you can listen to their EditCompleted event, perform the necessary checks for the graphics and call the save here. Kindly see the code below for guide.
public MainPage()
{
InitializeComponent();
Editor editorForWidget = this.MyEditorWidget.DataContext as Editor;
if(editorForWidget != null)
editorForWidget.EditCompleted += new EventHandler<Editor.EditEventArgs>(editorForWidget_EditCompleted);
}
private void editorForWidget_EditCompleted(object sender, Editor.EditEventArgs e)
{
foreach (var edits in e.Edits)
{
e.Action // check action (EditVertices, Reshape, Cut, Select,..)
edits.Graphic // perform the check for graphic
// if check succeeds, save the edits
if (edits.Layer is FeatureLayer)
(edits.Layer as FeatureLayer).SaveEdits();
}
}
Jennifer
... View more
08-05-2010
08:55 AM
|
0
|
0
|
852
|
|
POST
|
Oh you are right, the Renderer is new to ArcGIS 10. I was going to point you to this http://sampleserver3.arcgisonline.com/ArcGIS/rest/services Notice that there is a "DrawingInfo" section that defines the renderer. This is the only ArcGIS 9.3.1 that I know about http://sampleserver1.arcgisonline.com/ArcGIS/rest/services Jennifer
... View more
08-04-2010
10:02 PM
|
0
|
0
|
836
|
|
POST
|
I believe the sample was written to show how you can define a renderer using the API. If your FeatureLayer already has a renderer, you do not need to overwrite it. Jennifer
... View more
08-04-2010
09:48 PM
|
0
|
0
|
836
|
|
POST
|
Sure, you can iterate thru your Map.Layers and check for each layer's visible property and pass in the layer's Url to the IdentifyTask if layer is visible. Jennifer
... View more
08-04-2010
09:42 PM
|
0
|
0
|
604
|
|
POST
|
How about adding this to the graphic's attributes (IDictionary<string, object>)? You are looking for a temporary storage for the ContextMenu, right? Jennifer
... View more
08-04-2010
09:00 PM
|
0
|
0
|
509
|
|
POST
|
Which version of API for SL/WPF are you using? You can learn more about v2.0 from here (see Concepts tab also) http://help.arcgis.com/en/webapi/silverlight/samples/start.htm In the code you provided, I don't think you need to have your tooltip bound to the grid. Are you able to go to your map layer's URL through IE? At minimum, I think the following code should be sufficient to display your map.
<Grid x:Name="LayoutRoot" Background="White">
<esri:Map x:Name="map">
<esri:ArcGISTiledMapServiceLayer ID="SustainMapService" Url="http://webgis/ArcGISUWM/rest/services/SustainMap/MapServer"/>
</esri:Map>
</Grid>
Jennifer
... View more
08-04-2010
08:28 PM
|
0
|
0
|
663
|
|
POST
|
Thank you for your post. We are looking into this. Jennifer
... View more
08-03-2010
09:39 AM
|
0
|
0
|
301
|
|
POST
|
You can set the Visibility property of the layer and before adding the legend, check if the layer is Visible. Jennifer
... View more
08-03-2010
09:17 AM
|
0
|
0
|
1093
|
|
POST
|
Hi, What version of Silverlight/WPF API are you using and how can we reproduce this error? Thanks. Jennifer
... View more
08-03-2010
08:29 AM
|
0
|
0
|
755
|
|
POST
|
It might be easier to use Expression Blend for this or you can also do this: Add reference to the following assemblies: ESRI.ArcGIS.Client.Behaviors.dll System.Windows.Interactivity Having the following XAML namespace definitions: xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" should be sufficient. This will allow you to <i:Interaction.Behaviors> <esri:ConstrainExtentBehavior ConstrainedExtent="-120,30,-60,60" /> </i:Interaction.Behaviors> Jennifer
... View more
08-02-2010
08:19 PM
|
0
|
0
|
1021
|
| 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 |
11-03-2025
08:39 PM
|