EmptyProvider and Citynames

2 posts, 0 answers
  1. Dirk Liebich
    Dirk Liebich avatar
    17 posts
    Member since:
    Jun 2010

    Posted 18 Aug 2011 Link to this post

    Hey there,

    can anybody explain how to show the state and city names on the map when using the EmptyProvider?

    I am not using the openstreetmap or bingprovider because I only want to show Asia on my map centered on the screen.
    If I am using one of the providers above the map shows basically the entire earth and not only the shapes I have binded (Asia).

    I am looking for a map that only shows Asia centered in the screen with its capital city names and states.

    Thanks for any feedback.

    Below you'll find my xaml....

     <telerik:RadMap x:Name="radMap" UseDefaultLayout="False">
                <telerik:RadMap.Providers>
                    <telerik:EmptyProvider/>
                    <!--<telerik:OpenStreetMapProvider/>-->
                    <!--<telerik:BingMapProvider
                        ApplicationId="An5jY7yMdjU12_fZjI4evnJJ_Juwt38lr9TPdRK3UjaT2Uio-nKzl10K8jPnLnvT"
                        IsLabelVisible="True"/>-->
                    
                </telerik:RadMap.Providers>

                <telerik:InformationLayer x:Name="shapeLayer" >
                    <telerik:InformationLayer.Reader>
                        <telerik:MapShapeReader
                            DataSource="/DTClientServices.PlanningSuite.Views;component/Shapefiles/Asia/asia.dbf"
                            Source="/DTClientServices.PlanningSuite.Views;component/Shapefiles/Asia/asia.shp"/>
                    </telerik:InformationLayer.Reader>
                    <telerik:InformationLayer.ShapeFill>
                        <telerik:MapShapeFill Fill="#64D3D3D3" StrokeThickness="0"/>
                    </telerik:InformationLayer.ShapeFill>
                    <telerik:InformationLayer.HighlightFill>
                        <telerik:MapShapeFill Fill="#64FFC21C" StrokeThickness="0"/>
                    </telerik:InformationLayer.HighlightFill>
                    </telerik:InformationLayer>


                    <telerik:InformationLayer x:Name="informationLayer" ItemsSource="{Binding MapData}" >
                        <telerik:InformationLayer.ItemTemplate>
                            <DataTemplate>
                                <Grid   telerik:MapLayer.BaseZoomLevel="{Binding BaseZoomLevel}"
                                        telerik:MapLayer.Location="{Binding Location}"
                                        telerik:MapLayer.ZoomRange="{Binding ZoomRange}">
                                <m:MapIconView Height="15" Width="15">
                                    <ToolTipService.ToolTip>
                                        <ToolTip>

                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition/>
                                                    <RowDefinition/>
                                                </Grid.RowDefinitions>

                                                <StackPanel Grid.Row="0">
                                                    <TextBlock Grid.Row="0" FontWeight="Bold" Text="{Binding Caption,FallbackValue=Caption}"/>

                                                    <Grid Margin="4">
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition />
                                                            <RowDefinition />
                                                            <RowDefinition />
                                                            <RowDefinition />
                                                            <RowDefinition />
                                                        </Grid.RowDefinitions>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>

                                                        <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
                                                            <TextBlock Text="{Binding Measure1, FallbackValue=Measure1}"/>
                                                            <TextBlock Text=": "/>
                                                        </StackPanel>
                                                        <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Volume1, FallbackValue=Volume1}"/>

                                                        <StackPanel Grid.Row="1" Grid.Column="0"  Orientation="Horizontal">
                                                            <TextBlock Text="{Binding Measure2, FallbackValue=Measure2}"/>
                                                            <TextBlock Text=": "/>
                                                        </StackPanel>

                                                        <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Volume2, FallbackValue=Volume2}"/>

                                                        <Line Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Stretch="Fill" Stroke="LightGray" X2="1"/>

                                                        <TextBlock Grid.Row="3" Grid.Column="0">Rating:</TextBlock>
                                                        <Ellipse
                                                            Grid.Row="3"
                                                            Grid.Column="1"
                                                            Fill="Green"
                                                            Height="10"
                                                            Width="10" Margin="0,0,120,0" />
                                                        <TextBlock Grid.Row="4" Grid.Column="0">Status:</TextBlock>
                                                        <Ellipse
                                                            Grid.Row="4"
                                                            Grid.Column="1"
                                                            Fill="Red"
                                                            Height="10"
                                                            Width="10" Margin="0,0,120,0" />
                                                    </Grid>
                                                </StackPanel>


                                            </Grid>
                                        </ToolTip>
                                    </ToolTipService.ToolTip>
                                </m:MapIconView>
                                    <!--<telerik:MapLayer.HotSpot>
                                    <telerik:HotSpot X="0.5" Y="0.5" ElementName="PART_Ellipse" />
                                </telerik:MapLayer.HotSpot>
                                    
                                <Ellipse x:Name="PART_Ellipse"
                                   Width="20"
                                   Height="20"
                                   Stroke="Red"
                                   StrokeThickness="3"
                                   Fill="Transparent">
                                    <ToolTipService.ToolTip>
                                        <ToolTip Content="{Binding Caption}" />
                                    </ToolTipService.ToolTip>
                                </Ellipse>-->
                                    
                                    
                            </Grid>
                        </DataTemplate>
                    </telerik:InformationLayer.ItemTemplate>
                </telerik:InformationLayer>
            </telerik:RadMap>
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 23 Aug 2011 Link to this post

    Hello Dirk Liebich,

    Unfortunately, we do not have this data. You can try searching the corresponding shape or KML files in internet.

    Regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top