|
POST
|
TextSymbol textSymbol1 = LayoutRoot.Resources["MyTextSymbol"] as TextSymbol; ....... TextSymbol textSymbol2 = LayoutRoot.Resources["MyTextSymbol"] as TextSymbol; Despite different names, both variables point to the same text symbol. When you change the symbol, your change applies to all graphics using this symbol, i.e all your graphics. You should either create different symbols (if there are few possible Text values) or, likely better, bind the symbol Text to a graphic attribute, so you don't have to change the symbol. i.e something like: <esri:TextSymbol x:Key="MyTextSymbol" Text={Binding Attributes[myFieldUsedForLabelling]}>
<esri:TextSymbol.ControlTemplate>
<ControlTemplate>
<Border Background="White" BorderBrush="Black">
<TextBlock x:Name="MyInfo"
FontSize="{Binding Symbol.Size}"
Text="{Binding Symbol.Text}"
Foreground="Blue"
FontFamily="{Binding Symbol.FontFamily}"
HorizontalAlignment="Center" />
</Border>
</ControlTemplate>
</esri:TextSymbol.ControlTemplate>
</esri:TextSymbol> or directly in the template: <esri:TextSymbol x:Key="MyTextSymbol">
<esri:TextSymbol.ControlTemplate>
<ControlTemplate>
<Border Background="White" BorderBrush="Black">
<TextBlock x:Name="MyInfo"
FontSize="{Binding Symbol.Size}"
Text="{Binding Attributes[myFieldUsedForLabelling]}"
Foreground="Blue"
FontFamily="{Binding Symbol.FontFamily}"
HorizontalAlignment="Center" />
</Border>
</ControlTemplate>
</esri:TextSymbol.ControlTemplate>
</esri:TextSymbol>
... View more
01-30-2013
03:23 AM
|
0
|
0
|
979
|
|
POST
|
Seems to be a bug in version 2.4. It's working well with 2.2, 2.3, 3.0, 3.1 versions but not with 2.4. In 2.4, the workaround is to set the SpatialReference of the map points and of the map extent. With these initializations it's working well.
... View more
01-28-2013
02:49 AM
|
0
|
0
|
778
|
|
POST
|
As your question seems more related to the viewer builder, I suggest you post your question on the ArcGIS Viewer for Silverlight forum.
... View more
01-28-2013
01:39 AM
|
0
|
0
|
648
|
|
POST
|
Unfortunately, I don't figure out any easy way except looping on all graphics and looking for the graphic having the attributes equals to the datacontext of the maptip.
... View more
01-28-2013
01:36 AM
|
0
|
0
|
525
|
|
POST
|
The page no longer works. Looks working for me. Might have been a temporary issue. Let me know if it's still not working for you.
... View more
01-28-2013
01:29 AM
|
0
|
0
|
1207
|
|
POST
|
I am not sure about what you call 'minimal' and 'maximal' measure of a polyline M feature, but you might look at this linear referencing sample. It does linear referencing calculutions at client side that might be useful for you.
... View more
01-28-2013
01:27 AM
|
0
|
0
|
436
|
|
POST
|
Did you look at this sample? http://www.arcgis.com/home/item.html...b64a2d421d5716 Live version: http://serverapps.esri.com/Silverlig.../GeoReference/ It allows you to calculate the parameters needed to correctly place an image, including rotation. I am not sure it's exactly what you need, but it could give you ideas on how to develop what you are looking for.
... View more
01-28-2013
01:24 AM
|
0
|
0
|
480
|
|
POST
|
Yeah I tried that but then there are different-sized features that should have their labels visible at different resolutions. Any idea about that? At this time, my only idea is to create several graphicslayers, one by range of feature sizes and to set the MaximumResolution accordingly. I guess, you'd rather to get a labelling engine at client side working label by label but unfortunately, that doesn't exist yet.
... View more
01-21-2013
03:05 AM
|
0
|
0
|
3088
|
|
POST
|
The easier way is to set a MaximumResolution to your graphics layer that contains your text symbols so your labels won't be visible when the user zooms out.
... View more
01-18-2013
09:36 AM
|
0
|
0
|
3088
|
|
POST
|
LabelPoints returns the correct points, but then the text's top-left (or bottom-left) corner is placed at that point. I want to center the text. Not sure how to offset it, since the text can change. Any ideas? You can retemplate the symbol and use either OffsetX/OffsetY or the margin to translate the text. If you can know the max width of your text (100 here), this should work: <esri:TextSymbol FontSize="14" OffsetX="50" OffsetY="7" Text="{Binding Attributes[myAttribute]}">
<esri:TextSymbol.ControlTemplate>
<ControlTemplate>
<TextBlock Width="100" FontFamily="{Binding Symbol.FontFamily}"
FontSize="{Binding Symbol.FontSize}"
Foreground="{Binding Symbol.Foreground}"
Text="{Binding Symbol.Text}" TextAlignment="Center" />
</ControlTemplate>
</esri:TextSymbol.ControlTemplate>
</esri:TextSymbol>
... View more
01-18-2013
12:20 AM
|
0
|
0
|
3088
|
|
POST
|
I have not found the solution ! Do you have an idea of �??�??how to retrieve the symbol from legend_refresh? The symbols come from the renderer. For example, if your renderer is an UniqueValueRenderer, you can get the Infos collection. Each uniquevalueinfo has a symbol property which is likely what you are looking for. Additionaly an UniqueValueRenderer may have a DefaultSymbol which, if not null, will be first in the LegendItems collection.
... View more
01-17-2013
10:32 PM
|
0
|
0
|
2054
|
|
POST
|
in your code, which I still cannot get to work (no layers are shown with the new link), you are looping through each layer and executing Async each time. It is not clear how you are handling the completed event and allowing it to finish before executing the next layer. Can you clarify? . Not sure about what is not working in your case? The approach of the sample is to create one Identify Task by visible layers and to execute them concurrently. The features returned by the identify tasks are added in the result datagrid in the completed event so, at the end of the process, the datagrid contains the results for all layers. Only the first completed event (flag needReset) clears the datagrid before populating the datagrid with the first features. I've seen Jennifer talk about chaining Async in the completed code for additional Identifies but if you have several/many map services, that makes it unworkable, I believe. This approach should work as well but should be slower since the identify tasks are executed sequentially.
... View more
01-17-2013
10:20 PM
|
0
|
0
|
1622
|
|
POST
|
but I found that the answer is consistently off in both area and length by a particular ratio (unit values being returned are always ~1.35x bigger than they should be). To get accurate results, you have better to use Equal Area Projection such as WKID 54034. Your result is likely due to the Web Mercator distorsion which is 1/cos(latitude). That being said, the best approach is likely to use the built-in geodesic methods. This method should return accurate results when your input in in geographical coordinates and is Superior to the Euclidian method that you tested. Note that a negative value is normal if your polygon is oriented in a counter clock wise direction.
... View more
01-17-2013
10:08 PM
|
0
|
0
|
900
|
|
POST
|
You are right WPF, Silverlight and WP7 share essentially the same code base. The fix for this issue is in the version 10.1.1 that is now out.
... View more
01-17-2013
09:43 PM
|
0
|
0
|
359
|
|
POST
|
Thanks Chris. Good to know that the workaround is working well. There will be a fix in the next version (post 10.1.1). do you have an update for another post you were active in regarding WMS as a base layer and it being displayed blank? The fix is in the version 10.1.1 that is now out. Would be easier to debug these types of issue with source. Perhaps those with a service contract. No need of a service contract :), the sources of the toolkit, which includes the WMS layer, are available on codeplex.
... View more
01-17-2013
09:27 PM
|
0
|
0
|
2084
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|