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

Caption with ShapeData

4 Answers 65 Views
Map
This is a migrated thread and some comments may be shown as answers.
Abder Rezak
Top achievements
Rank 1
Abder Rezak asked on 26 Feb 2014, 06:17 PM
Hi,

I have a RadMap with many ellipse (created from EllipseData) and I would like to display text beside the left border of these ellipse.
I have been able to do something like this with a MapEllipseGeometry (that have a CaptionLocation) in an InformationLayer, but I wonder if it's possible to do this with ShapeData in VisualizationLayer.

Thank you!

4 Answers, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 27 Feb 2014, 08:54 AM

Hi Abder Rezak,

The map shape data objects like the EllipseData do not support captions. You can use additional VisualizationLayer to display text over the ellipses.

I have attached a sample solution.

I hope it helps.

Regards,
Andrey Murzov
Telerik

0
Abder Rezak
Top achievements
Rank 1
answered on 28 Feb 2014, 05:36 PM
Hi Andrey,

Thanks for the quick reply, I will try your solution.

Regards
0
Abder Rezak
Top achievements
Rank 1
answered on 14 Mar 2014, 03:56 PM

Hi Andrey,

I tried your solution but I think I have a problem with the bindings, they don't seems to work when I use ElementName.
I did some changes to your sample that represent what I'm trying to do :

<DataTemplate x:Key="ItemTemplate">
    <telerik:MapPathView>
        <telerik:MapPathView.Data>
            <telerik:MapEllipseGeometryView Center="{Binding Location}"
                RadiusX="{Binding ElementName=TheWindow, Path=NiceRadius}"
                RadiusY="{Binding ElementName=TheWindow, Path=NiceRadius}" />
        </telerik:MapPathView.Data>
    </telerik:MapPathView>
</DataTemplate>

I have also add the property "NiceRadius" in code behind and set the window name to "TheWindow".

Do you have any idea of what I did wrong ?

Thank you!

0
Andrey
Telerik team
answered on 17 Mar 2014, 12:45 PM
Hello Abder Rezak,

In fact the MapPathView class is the wrapper for the MapShapeData. Because of its specifics it does not support the binding of this type. You can use data binding to properties of your data item only.

Regards,
Andrey Murzov
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
Map
Asked by
Abder Rezak
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Abder Rezak
Top achievements
Rank 1
Share this question
or