|
POST
|
Map's Extent or FeatureLayer's Where properties, for example are not bindable properties. So if you have a model that needs to manage these properties, you cannot do so with a binding statement. Or if you would like to update the GraphicsLayer's Graphics property with some binding statement like Graphics={Binding Graphics} assuming you have already set the Map's DataContext to your model. This too will fail because the Map will first attempt to set all the properties of its layers prior to determining what DataContext it is in. The resulting binding statement then will be similar to Graphics = null since it was not able to resolve the DataContext. This will throw an exception because Graphics need to be a GraphicsCollection. You can look at this post for a workaround: http://forums.arcgis.com/threads/9868-Bind-graphics-of-GraphicLayer.-Bind-GraphicCollection To really know if MVVM is feasible with our API, you have to try and make a list of stumbling blocks (if any). The ones I listed above are things I've experienced when I try MVVM approach. Our API was designed before MVVM was encouraged in SL but we are working towards this goal and we welcome any feedbacks.
... View more
08-17-2010
09:56 AM
|
0
|
0
|
695
|
|
POST
|
I was able to replicate both issues and we marked them as defect. I will be working on getting these two fixed in future release. For #1 - this seem to only happen when the SelectionMode for the layer is SelectionOnly. For #2 - this seem to happen when the new selection does not include any feature from the other layers. For the meantime, you can use the EditorWidget, this seem to not have the two bugs that you mentioned, or you can iterate through graphics of each layer and ensure that when graphic.Selected is true, mark graphic.Selected to false before performing new selection.
... View more
08-17-2010
09:34 AM
|
0
|
0
|
326
|
|
POST
|
1) When the editors drawmode is set to polygon and user draws area that contains no features in it, the editor stops working (despite it is set on continousmode). Same behaviour can be seen e.g. in samples http://help.arcgis.com/en/webapi/sil...LayerSelection. This seems to happen when layer is SelectionOnly mode. If you try this other sample, selecting on an area without feature does not end "Add to selection." http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsAutoSave 2) When map has two (or more) featurelayers, editor is set to polygon drawmode and the command is Editor.Select("New"), new selection clears previous selections only from one of the featurelayers. I am not able to replicate this. The Editor you are using here has set its LayerIDs property to include all the feature layers? I will look into both of these and let you know what I find. Thank you for your post.
... View more
08-17-2010
06:29 AM
|
0
|
0
|
326
|
|
POST
|
You can measure in one unit and convert into another unit. Here's some conversion table I found online: http://library.thinkquest.org/3804/length.html If they will be choosing unit of measurement before calculating distance, you can change the Distance Parameter (Distance Unit) before calling DistanceAsync(). Here's the SDK sample:http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Distance But if you expect the unit of measurement to change after Distance has been calculated, it would make sense to just perform the conversion to the new unit of measurement instead of re-calculating distance.
... View more
08-17-2010
06:16 AM
|
0
|
0
|
478
|
|
POST
|
For forum usage questions, you can refer to this link: http://forums.arcgis.com/faq.php?faq=vb3_board_faq#faq_vb3_board_usage I have actually not marked any posts as "resolved" or have started a thread so I don't know how to answer that question but this FAQ page might be useful. As far as notifications go, I think going to your Settings page, you can check/uncheck notifications box.
... View more
08-16-2010
05:55 PM
|
0
|
0
|
529
|
|
POST
|
I don't want the features to draw when I zoom out beyond the Min Scale. This might be something we will support out-of-the-box in the future versions of our API. But for the meantime, you can get the minimum scale information from your layer this way.
public MainPage()
{
InitializeComponent();
FeatureLayer layer = this.MyMap.Layers["LayerID"] as FeatureLayer;
if (layer == null) return;
WebClient webClient = new WebClient();
webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);
webClient.DownloadStringAsync(new Uri(layer.Url + "?f=json", UriKind.RelativeOrAbsolute));
}
void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
string[] properties = e.Result.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
string minScale = properties.FirstOrDefault(p => p.Contains("minScale"));
if(minScale != null)
minScale = minScale.Substring(minScale.IndexOf(':') + 1, minScale.Length - (minScale.IndexOf(':') +1));
//TODO: use this minScale value.
}
... View more
08-16-2010
05:47 PM
|
0
|
0
|
839
|
|
POST
|
We are aware that some properties in the API are either not bindable or get their value after some event has fired, which makes observing MVVM pattern a little difficult to achieve. While we are still working on making our API more "MVVM-friendly," I have seen users post here that they are following MVVM pattern using our API so I guess it's not impossible to do.
... View more
08-16-2010
05:00 PM
|
0
|
0
|
695
|
|
POST
|
Hi Steve, Why would you need to set the MinimumScale? Our current API has does not update this internal property. It is only used as metadata information. So if you have a use case for needing this property exposed and editable, please let us know. Even though this property is currently internal to our API, there's nothing stopping you from retrieving this information from the json string. You can do a call to DownloadStringAsync from WebClient, with Uri = layer's url appended with "?f=json". In the DownloadStringCompleted eventhandler, you can parse the result to get MinimumScale property.
... View more
08-16-2010
01:10 PM
|
0
|
0
|
839
|
|
POST
|
The Play button in the TimeSlider is visible when you have defined intervals for your TimeSlider. You can look at these examples for reference (see code-behind).http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#TimeSliderFeatureLayer http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#TemporalRendererSimple http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#TimeImageService
... View more
08-16-2010
12:24 PM
|
0
|
0
|
458
|
|
POST
|
How about placing the map inside a border with height and width before placing the border inside a canvas?
... View more
08-13-2010
07:35 PM
|
0
|
0
|
741
|
|
POST
|
If you plan to use a map with FeatureLayer, you can use the FeatureDataGrid. It already has sorting built-in. In this sample, you can update the FeatureLayer's Where property to define your query task. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureDataGrid Otherwise, you can follow this sample as guide for performing query task and assigning results to a datagrid: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryWithoutMap and this codeproject for sorting/grouping/filtering in datagrid:http://www.codeproject.com/Articles/83906/Silverlight-4-Datagrid-Sorting-Grouping-Filtering-.aspx
... View more
08-13-2010
07:15 PM
|
0
|
0
|
552
|
|
POST
|
We marked this as something we will look into but it is currently not supported and I am not aware of any workaround except for - don't put your map inside the ScrollViewer 😛 (Sorry!)
... View more
08-13-2010
04:57 PM
|
0
|
0
|
984
|
|
POST
|
If you are using the EditorWidget or made a button with Command bound to the Editor's ClearSelection, the Editor's EditCompleted will fire when this command has successfully cleared selection. The Action you are looking for is ClearSelection. ArcGIS API for SL/WPF v2.0. If you are not using this version, your best bet will be to listen to PropertyChanged event on the layer. The Property you are looking for is SelectionCount or SelectedGraphics.
... View more
08-13-2010
03:10 PM
|
0
|
0
|
550
|
|
POST
|
Binding with Layer properties can be done instead of {Binding ElementName=MyMap, Path=Layers[0].Opacity} a better way would be {Binding ElementName=MyMap, Path=Layers[LayerID].Opacity} so that any changes in the order will not affect your binding.
... View more
08-13-2010
06:12 AM
|
0
|
0
|
1436
|
|
POST
|
New to ArcGIS 10 is the "DrawingInfo" which defines the Renderer. When you visit your FeatureLayer URL in the browser, do you see this property and symbols defined? Is this the symbol you see in your map when you run your application? If yes, the Renderer trumps the FeatureSymbol and if you don't want the Renderer to be used you should set it to null. What you can do is either set the FeatureSymbol or overwrite your layer's renderer by setting it to a SimpleRenderer with your marker symbol. I suggest to use SimpleRenderer over UniqueValueRenderer if you don't have to distinguish between types or attributes. If you want a single feature symbol used for your graphics.
... View more
08-13-2010
06:08 AM
|
0
|
0
|
598
|
| 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
|