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

MapRectangle, MapPolygon... not working within a DataTemplate?

1 Answer 69 Views
Map
This is a migrated thread and some comments may be shown as answers.
Frederic
Top achievements
Rank 1
Frederic asked on 15 Jun 2010, 05:49 PM
Hi,
I am binding a list of objects to an InformationLayer and trying to display:
- some text
- some shape, tied to current location and zoom level.
XAML looks like that:
            <map:InformationLayer ItemsSource="{Binding Sales}"
                <map:InformationLayer.ItemTemplate> 
                    <DataTemplate> 
                        <Canvas map:MapLayer.Location="{Binding Location}"
                            <TextBlock Text="Hi world"/> 
                            <map:MapRectangle  
                                Location="{Binding Location}" 
                                Width="1" 
                                Height="1" 
                                RadiusX="0.1" 
                                RadiusY="0.1" 
                                Fill="#7FFFFF00" 
                                Stroke="Red" 
                                StrokeThickness="2" /> 
                        </Canvas> 
                    </DataTemplate> 
                </map:InformationLayer.ItemTemplate> 
            </map:InformationLayer> 

I can see the TextBlock (at the right location) but not the MapRectangle (beside, I have to use a custom attached property to bind the location!).
It seems that MapRectangle (or any drawable) can only be added as direct childs to the InformationLayer class.
Am I correct?
And if so, I see little use in the map shape classes!

Regards
Frederic

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 16 Jun 2010, 10:13 AM
Hello Frederic,

Unfortunately map shape objects can’t be used in the data template in current version of the RadMap control. We have this feature in our plans for the future releases of our control. You can check its availability using our PITS system:

http://www.telerik.com/support/pits.aspx#/public/silverlight/2362

Regards,
Andrey Murzov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Map
Asked by
Frederic
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or