|
POST
|
The legend control is new in 2.1. So, it's not there if you are using 2.0 version. In the print map sample, the legend is only used in a sample of print style. If you remove it, you no longer need 2.1 version. BTW : The 2.1 final is now available for download : http://help.arcgis.com/en/webapi/silverlight/
... View more
12-02-2010
09:51 AM
|
0
|
0
|
2998
|
|
POST
|
Hi Stephan, Your edmMapTip resource is a DataTemplate not a MapTip, so your cast can't work. You need the C# equivalent of this xaml code:
<esri:FeatureLayer.MapTip>
<ContentControl ContentTemplate="{StaticResource maptip}" Content="{Binding}" />
</esri:FeatureLayer.MapTip>
it should be something like:
reportLayer.MapTip = new ContentControl()
{
ContentTemplate = (DataTemplate)grdMapBase.Resources["maptip"]
};
reportLayer.MapTip.SetBinding(ContentControl.ContentProperty, new Binding());
... View more
12-02-2010
01:50 AM
|
0
|
0
|
2437
|
|
POST
|
But with the White background, does the maptip stay open or not?
... View more
12-01-2010
12:17 PM
|
0
|
0
|
2029
|
|
POST
|
I am not sure that your border has a background (depending on how is defined you CommonBorder style). Please try by setting a background explicitely. Something like :
<Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5" Background="White" Padding="10,3,10,3" Effect="{StaticResource dropShadow}" IsHitTestVisible="True" >
......
or
<Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5" Background="Transparent" Style="{StaticResource CommonBorder}" Padding="10,3,10,3" Effect="{StaticResource dropShadow}" IsHitTestVisible="True" >
... View more
12-01-2010
10:00 AM
|
0
|
0
|
2029
|
|
POST
|
I probably missed something but if you wrote your own legend service, why this service is not returning [{"LayerId":0,"LayerName":"best objective track points","Legend":[{"Label":"Forecasted","Url":"https:\/\/OURARCGISSERVER \/arcgisoutput\/_ags_leg6e267d44bf7e474ba4c458f2fb3fc411.jpg"}.... ... instead of [{"LayerId":0,"LayerName":"best objective track points","Legend":[{"Label":"Forecasted","Url":"http:\/\/OURARCGISSERVER \/arcgisoutput\/_ags_leg6e267d44bf7e474ba4c458f2fb3fc411.jpg"}.... ... If you are using the arcgis.com legend service, you can add the parameter 'returnbytes=true', so the image will be returned as imageData instead of an URL. Example : http://www.arcgis.com/sharing/tools/legend?soapUrl=http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer&f=pjson&returnbytes=true Then there is no more cross scheme issue.
... View more
12-01-2010
08:04 AM
|
0
|
0
|
683
|
|
POST
|
Yes for sure you can have a wait indicator. If you created your templated control with Blend by using the 'Copy' function, you should get it by default. If you created your control from scratch or from VS, you can use (or adapt) this MapLayerTemplate which is the default:
<esri:Legend.MapLayerTemplate>
<DataTemplate>
<StackPanel>
<StackPanel.Resources>
<!-- Busy indicator displayed while the legend is requested-->
<DataTemplate x:Key="BusyIndicatorTemplate">
<Grid x:Name="BusyIndicator" Background="Transparent" Margin="3,0"
HorizontalAlignment="Left" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" >
<Grid.Triggers>
<EventTrigger RoutedEvent="Grid.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="0:0:1" RepeatBehavior="Forever" To="360" Storyboard.TargetName="BusyIndicator"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Grid.Triggers>
<Grid.RenderTransform>
<RotateTransform />
</Grid.RenderTransform>
<Ellipse Fill="#1E525252" Margin="11,2,11,20" Width="2" Height="2"/>
<Ellipse Fill="#3F525252" Height="3" Width="3" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,4,5,0" />
<Ellipse Fill="#7F525252" Width="4" HorizontalAlignment="Right" Height="4" VerticalAlignment="Top" Margin="0,9,1,0" />
<Ellipse Fill="#BF525252" Height="5" Width="5" VerticalAlignment="Bottom" Margin="0,0,3,3" HorizontalAlignment="Right" />
<Ellipse Fill="#FF525252" Height="6" Width="6" VerticalAlignment="Bottom" Margin="9,0" />
</Grid>
</DataTemplate>
</StackPanel.Resources>
<ToolTipService.ToolTip>
<StackPanel MaxWidth="400">
<TextBlock FontWeight="Bold" Text="{Binding Layer.CopyrightText}" TextWrapping="Wrap" />
<TextBlock Text="{Binding Description}" TextWrapping="Wrap" />
<TextBlock Text="{Binding MinimumResolution, StringFormat='Minimum Resolution : {0:F6}'}" />
<TextBlock Text="{Binding MaximumResolution, StringFormat='Maximum Resolution : {0:F6}'}" />
</StackPanel>
</ToolTipService.ToolTip>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding IsEnabled, Mode=TwoWay}" IsEnabled="{Binding IsInScaleRange}" />
<!--Opacity slider-->
<Slider Margin="0,0,5,0" Minimum="0" Maximum="1" Width="30" Height="18"
Value="{Binding Layer.Opacity, Mode=TwoWay}" />
<!--Busy indicator-->
<ContentControl ContentTemplate="{StaticResource BusyIndicatorTemplate}"
Visibility="{Binding BusyIndicatorVisibility}"/>
<TextBlock Text="{Binding Label}" FontWeight="Bold" VerticalAlignment="Center" />
</StackPanel>
</StackPanel>
</DataTemplate>
</esri:Legend.MapLayerTemplate>
... View more
12-01-2010
07:51 AM
|
0
|
0
|
735
|
|
POST
|
Be sure that your maptip framework element has: - IsHitTestVisible set to true - a background not null - a MapTipHideDelay > 0 If this doesn't help, please share how your maptip looks like.
... View more
12-01-2010
07:36 AM
|
0
|
0
|
2029
|
|
POST
|
The maptip of a graphicslayer is a frameworkelement. This framework element can't be defined as resource. So, this is NOT working:
<Grid.Resources>
<Border x:key="maptip" >
.......
</Border>
</Grid.resources>
........
<esri:FeatureLayer Maptip="{StaticResource maptip}" ........
Nor is this C# code working:
myFeatureLayer.MapTip = [FrameworkElement]LayoutRoot.Resources["maptip"];
Instead you can use a DataTemplate:
<Grid.Resources>
<DataTemplate x:key="maptip" >
<Border >
.......
</Border>
</DataTemplate>
</Grid.resources>
........
<esri:FeatureLayer ...>
<esri:FeatureLayer.MapTip>
<ContentControl ContentTemplate="{StaticResource maptip}" Content="{Binding}" />
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
The equivalent C# code is working as well. Or you can define your own custom maptip control:
<esri:FeatureLayer ...>
<esri:FeatureLayer.MapTip>
<MyMaptipControl .............../>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
or the equivalent in C# : myFeatureLayer.MapTip = new MyMaptipControl() { ......}; Hope this help.
... View more
12-01-2010
07:01 AM
|
0
|
0
|
2437
|
|
POST
|
I added this "MaximumResolution="1.7976931348623157E+308" This is the infinity. The slider is not designed to make interpolation until infinity. Please try with a lower value. It's difficult to give you a value which makes sense because it's depending on your map units (it's why I don't like these resolution properties but I am very 'old school' :)) I guess the best is you to experiment with different values.
... View more
11-30-2010
12:25 AM
|
0
|
0
|
3485
|
|
POST
|
"Applications targeting Silverlight version 3 can only bind to target properties of a FrameworkElement. Support for binding to any DependencyObject dependency property was added in Silverlight 4." It does not look like UserControl derives from FrameworkElement. See msdn documentation: http://msdn.microsoft.com/en-us/libr...tanceContinued UserControl derives from Control, so derives indirectly from FrameworkElement as well. The following link shows someone with a similar problem and the workaround they used. http://betaforums.silverlight.net/fo...20/418564.aspx I am not sure we are in the same case since Map doesn't derive from ContentControl. Personally I never experienced any issue when adding a DP of type Map but if you run into this kind of issue please share the code I will try to analyze.
... View more
11-29-2010
12:33 AM
|
0
|
0
|
1270
|
|
POST
|
You are right. I don't think it's possible with the built-in draw object. You could write your own draw which would draw a rectangle over the map, but I guess it's not that simple.
... View more
11-29-2010
12:22 AM
|
0
|
0
|
1586
|
|
POST
|
The class DataContractJsonSerializer is in System.ServiceModel.Web.
... View more
11-26-2010
06:42 AM
|
0
|
0
|
1989
|
|
POST
|
There is a nice sample of custom cursor here : http://www.arcgis.com/home/item.html?id=b77d416635a74e66ab222fe519af2eb7
... View more
11-26-2010
03:58 AM
|
0
|
0
|
2654
|
|
POST
|
Sorry I have no idea to help you. perhaps, as a workaround, you could create a 'SpatialReference' property in your graphicslayer and tell the user to initialize this property:o
... View more
11-25-2010
10:42 AM
|
0
|
0
|
2196
|
|
POST
|
When you rotate the map, you rotate at the same time all the layers inside the map including the graphicslayer. This is 'By Design' else the result would be very stange in most cases. For your case, I think that the best way is you to calculate the geometry (polyline or polygon) of your rectangle in order this rectangle looks not rotated for the the user (would nee a few sine and cosine:)).
... View more
11-25-2010
10:24 AM
|
0
|
0
|
1586
|
| 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
|