|
POST
|
Image Source property expects a BitmapImage. If your image URL still need to be formed from a graphic attribute, you can create your own image converter that will do this type of extra handling. In your MapTip, you can do: XAML
<Image x:Name="OverviewImage" Source="{Binding [ProjectID], Converter={StaticResource imageConverter}}" />
Provided you have an ImageConverter that performs this conversion from string to BitmapImage
string imageUrl = string.Format("Images/{0}.png�?�, value);
return new BitmapImage(new Uri(imageUrl , UriKind.Relative));
... View more
10-22-2010
11:36 AM
|
0
|
0
|
649
|
|
POST
|
Please try the following sample. I tried to use your same approach of defining the Editor and Binding in code-behind and also add the layers at run-time. For simplicity, I only have ClearSelection, graphics in my sample are selected as soon as the feature layer update is complete. I added MouseLeftButtonDown so you can check which graphic belongs to which layer and whether it is infact, selected. I also added ZoomTo the layer's extent so you can verify visually whether their graphics are being selected/deselected. I could not replicate the issue. XAML-code
<Grid x:Name="LayoutRoot" Background="White">
<esri:Map x:Name="MyMap" Extent="-85.6657120405393,38.3219737638205,-85.5755236547754,38.3873509095678"/>
<Border x:Name="MyBorder" VerticalAlignment="Top" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal">
<Button x:Name="ClearBtn" Content="Clear" />
<Button x:Name="ZoomTo931" Content="Zoom to Layer931" Click="ZoomTo931_Click"/>
<Button x:Name="ZoomTo10" Content="Zoom to Layer10" Click="ZoomTo10_Click"/>
</StackPanel>
</Border>
</Grid>
Code-behind:
public MainPage()
{
InitializeComponent();
Editor editor = new Editor() { Map = this.MyMap, ContinuousMode = true };
Border border = this.LayoutRoot.FindName("MyBorder") as Border;
if (border != null)
border.DataContext = editor;
Button button = this.LayoutRoot.FindName("ClearBtn") as Button;
if (button != null)
button.SetBinding(Button.CommandProperty, new System.Windows.Data.Binding("ClearSelection"));
FeatureLayer layer = new FeatureLayer()
{
ID = "Layer10",
Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/2"
};
layer.UpdateCompleted += layer_UpdateCompleted;
layer.MouseLeftButtonDown += layer_MouseLeftButtonDown;
this.MyMap.Layers.Add(layer);
layer = new FeatureLayer()
{
ID = "Layer931",
Url = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/0"
};
layer.UpdateCompleted += layer_UpdateCompleted;
layer.MouseLeftButtonDown += layer_MouseLeftButtonDown;
this.MyMap.Layers.Add(layer);
}
void layer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e)
{
FeatureLayer layer = sender as FeatureLayer;
MessageBox.Show(string.Format("Layer ID: {0}, Graphic Selected: {1}", layer.ID, e.Graphic.Selected));
e.Handled = true;
}
void layer_UpdateCompleted(object sender, EventArgs e)
{
FeatureLayer layer = sender as FeatureLayer;
foreach (Graphic g in layer.Graphics)
g.Selected = true;
}
private void ZoomTo931_Click(object sender, RoutedEventArgs e)
{
this.MyMap.ZoomTo(new Envelope(-85.6657120405393, 38.3219737638205, -85.5755236547754, 38.3873509095678));
}
private void ZoomTo10_Click(object sender, RoutedEventArgs e)
{
this.MyMap.ZoomTo(new Envelope(-118.407424798307, 33.9943429215228, -117.3355913417, 34.7713100610928));
}
... View more
10-22-2010
11:13 AM
|
0
|
0
|
1079
|
|
POST
|
The Attribute window that you see from the EditorWidget and TemplatePicker, is our FeatureDataForm. How the form looks like depends on the FeatureLayer. What you define as OutFields in your FeatureLayer, will be the fields displayed on the form. If your FeatureLayer comes from a MapService, then everything will be read-only. If your FeatureLayer comes from an editable FeatureService, then whatever type or settings the service had given its fields will also apply to the fields in the form. In other words, to ensure that your primary key field is not editable, you have to make that setting in the feature service. You can however, create your own attribute window and exclude the primary key field in your form so you can update this attribute with your default value.
... View more
10-22-2010
09:03 AM
|
0
|
0
|
2020
|
|
POST
|
Can you also share your code on how you define the Editor? Also, do you set the DataContext of your ClearSelection button? In the XAML code I have, the StackPanel that includes my button has its DataContext set to the Editor. Do you do something similar in your code-behind binding?
... View more
10-22-2010
06:52 AM
|
0
|
0
|
1079
|
|
POST
|
I was able to reproduce this when after clicking onto the second polygon to edit it, and then you double-click to the first polygon whose vertex was just deleted. This bug will be fixed in the future release. It will be avoided by ensuring that there can never be more than one feature for edit at one time. Thanks.
... View more
10-22-2010
06:47 AM
|
0
|
0
|
575
|
|
POST
|
I think this is related to another post http://forums.arcgis.com/threads/15443-User-controls-code-structuring When using different UserControls, you can create a DependencyProperty (Map) on the UserControl or set DataContext and update your binding statements.
... View more
10-21-2010
11:55 AM
|
0
|
0
|
633
|
|
POST
|
Renderer="{x:Null}" in XAML is equivalent to Renderer = null in code-behind. However during the layer's initialization process, if your feature service has defined its own renderer, and your renderer is null - which is true in this case because of Renderer="{x:Null}" in XAML - the default renderer defined by your feature service will overwrite your renderer. This means, if you want FeatureSymbol to be used, you will need to set its renderer to null after the layer has initialized. I suggest you do this Renderer = null after the layer has initialized.
... View more
10-21-2010
10:02 AM
|
0
|
0
|
889
|
|
POST
|
Ah okay. I can bring it up for discussion with our team lead to see what he thinks. Thanks for the suggestion, we'll take that under advisement.
... View more
10-21-2010
10:00 AM
|
0
|
0
|
858
|
|
POST
|
I do not see anything wrong in the code you shared. It looks exactly like the sample, except Map was renamed. Check everywhere for GraphicsLayer, maybe it fails to retrieve the layer somewhere else not in this line. Check the call stack, this usually tells you which code was executed before the NullReference exception.
... View more
10-21-2010
09:57 AM
|
0
|
0
|
501
|
|
POST
|
What field type is Picture? Is it a string URL? Image Source property expects a BitmapImage. So if you are to write your converter, you need to convert string to BitmapImage BitmapImage bmp = new BitmapImage(new Uri(stringUrl, UriKind.Relative));
... View more
10-21-2010
09:50 AM
|
0
|
0
|
761
|
|
POST
|
If you are using SL, authentication is handled by your browser. It is normal to see 401 on Fiddler, this just denotes that the service had required authentication and following this 401, must be a 200 with the results of your query, which means it passed the authentication process. Since you are using Fiddler already, you can look at the webrequests made by your SL app. You can make the same requests outside your SL app by going directly to the browser and sending the same parameters. You can look at this thread, post #14http://forums.arcgis.com/threads/14730-Area-And-Perimeter for reference. While testing outside SL app, notice that there is 401 on Fiddler.
... View more
10-21-2010
09:44 AM
|
0
|
0
|
1980
|
|
POST
|
Once you have created an editable feature service. http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//009300000021000000.htm You can create a FeatureLayer (in XAML or code-behind), use Editor or Editor Widget to enable editing in your SL app. Look at this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsAutoSave You can also visit the FeatureLayer URL in your browser to see what operations are available to you if you were to make an editable feature service.
... View more
10-21-2010
09:36 AM
|
0
|
0
|
446
|
|
POST
|
I know, I had trouble finding resource too. After asking the experts, this for sure is what you need: http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//009300000021000000.htm
... View more
10-21-2010
09:26 AM
|
0
|
0
|
1139
|
|
POST
|
Thank you for your post, I was able to replicate it using our SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsAutoSave This is a bug, because if you choose Select command while Continuouse Mode is on and then Cancel, you are not able to Select again until you activate Select. We will try to get it fixed in the future release. Thanks!
... View more
10-21-2010
06:52 AM
|
0
|
0
|
537
|
|
POST
|
We try to make our API backwards compatible so it should work against ArcGIS Server 9.3.1. However you if you don't upgrade to ArcGIS Server 10, you cannot take advantage of the new features in v10. http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/index.html I think you plan to support ArcGIS Server 10 and up in the future, your best bet is to also get latest API, SL and VS. Read this also: http://help.arcgis.com/en/webapi/silverlight/help/index.html
... View more
10-21-2010
06:38 AM
|
0
|
0
|
782
|
| 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
|