Static Shapefiles and dynamic itemssource?

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

    Posted 17 Aug 2011 Link to this post


    I have the following xaml below and bind my POI's ect via the ItemsSource Binding on the information layer. The information layer itself gets its shapedata by once static source for Asia.

    Once I run the application I get the following exception:
    Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead.

    Is there any workaround you could offer in order to bind my map elements/POI's using the itemssource AND have the MapShapes configured in the XAML? I'd like to use as much MVVM I can and therefor I'd like to use data binding to my viewmodel.



       <telerik:RadMap x:Name="radMap" CommandBarVisibility="Visible" IsTextSearchEnabled="False">
            <telerik:InformationLayer x:Name="informationLayer" ItemsSource="{Binding MapData}">
                        <telerik:MapShapeReader DataSource="/DTClientServices.PlanningSuite.Views;component/Shapefiles/Asia/asia.dbf" Source="/DTClientServices.PlanningSuite.Views;component/Shapefiles/Asia/asia.shp" ClearLayer="False" />
                            <Grid telerik:MapLayer.BaseZoomLevel="{Binding BaseZoomLevel}"
                           telerik:MapLayer.Location="{Binding Location}"
                           telerik:MapLayer.ZoomRange="{Binding ZoomRange}">
                                    <telerik:HotSpot X="0.5"
                                               ElementName="PART_Ellipse" />
                                <Ellipse x:Name="PART_Ellipse"
                                        <ToolTip Content="{Binding Caption}" />
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 22 Aug 2011 Link to this post

    Hello Dirk,

    You can use 2 information layers. The first one will show map shapes from the shape file. The second one will show POIs from your data collection.

    Andrey Murzov
    the Telerik team

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

Back to Top