This is a migrated thread and some comments may be shown as answers.

Why doesn't my Map Legend show up?

2 Answers 63 Views
Map
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 18 Oct 2012, 11:34 PM
Hi..
Just trying to show a basic legend... why doesn't it show up... thx!
Also how can I show an pushpin in a legend



                                 <telerik:RadMap  Grid.Row="1"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="RadMap_Regions"  Margin="5"
                                     ZoomLevel="5"  Height="600" 
                                     Center="37.684297,-95.06924" 
                                     IsMouseWheelZoomEnabled="True" 
                                     IsKeyboardNavigationEnabled="False" DistanceUnit="Mile">


                                    <telerik:RadMap.Effect>
                                        <DropShadowEffect BlurRadius="3" ShadowDepth="5" Color="Silver" />
                                    </telerik:RadMap.Effect>
                                   
                                    <telerik:RadContextMenu.ContextMenu>
                                         <telerik:RadContextMenu x:Name="menuMap" telerik:StyleManager.Theme="Metro" BorderBrush="Navy" BorderThickness="1" >
                                    <telerik:RadContextMenu.Effect>
                                        <DropShadowEffect ShadowDepth="5" Color="Silver" BlurRadius="3" />
                                    </telerik:RadContextMenu.Effect>


                                    <telerik:RadMenuItem Header="Property Consumption Profile" Click="ProfileMenuItem_Click">
                                                <telerik:RadMenuItem.Icon>
                                                    <Image Source="../Images/info.png" Height="24" Width="24"/>
                                                </telerik:RadMenuItem.Icon>
                                            </telerik:RadMenuItem>


                                            <telerik:RadMenuItem Header="Quick Utility Consumption Comparison View" Click="QuickUtilMenuItem_Click">
                                                <telerik:RadMenuItem.Icon>
                                            <Image Source="../Images/chartnew24.png" Height="24" Width="24"/>
                                                </telerik:RadMenuItem.Icon>
                                            </telerik:RadMenuItem>


                                            <telerik:RadMenuItem Header="Detailed Utility Consumption Comparison Chart" Click="DetailComparelMenuItem_Click">
                                                <telerik:RadMenuItem.Icon>
                                                    <Image Source="../Images/data24.png" Height="24" Width="24"/>
                                                </telerik:RadMenuItem.Icon>
                                            </telerik:RadMenuItem>
 
                                        </telerik:RadContextMenu>
    
                                    </telerik:RadContextMenu.ContextMenu>


                                    <telerik:InformationLayer x:Name="informationLayer" Foreground="White" FontWeight="Bold">
                                        <telerik:InformationLayer.Reader>
                                            <telerik:MapShapeReader x:Name="mapShapeReader"  DataSource="{Binding MapSource,Mode=TwoWay}"/>
                                        </telerik:InformationLayer.Reader>
                                    </telerik:InformationLayer>


                                    <telerik:InformationLayer x:Name="informationLayerPushPins" />


                               </telerik:RadMap>






                        <telerik:MapLegend MarkerSize="40,20" 
                            VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,0,10,10">
                            <telerik:MapLegend.Header>
                                <TextBlock Margin="10,0,0,0">
                                <Run FontSize="16" FontWeight="ExtraBlack">GI</Run>
                                <Run FontSize="16">GRP</Run>
                            </TextBlock>
                            </telerik:MapLegend.Header>
                        </telerik:MapLegend>

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 19 Oct 2012, 02:57 PM
Hello Jon,

The MapLegend creates the items in the legend on the basis of the ColorMeasureScale object set to the Colorizer property of the Information Layer. It is designed for using with colorizers only.
I think it would be more appropriate if  you use a standard control like the StackPanel for your purposes.

Regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jon
Top achievements
Rank 1
answered on 19 Oct 2012, 03:05 PM
ok.. thx again
Tags
Map
Asked by
Jon
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Jon
Top achievements
Rank 1
Share this question
or