Custom MapShape?

2 posts, 0 answers
  1. Johannes
    Johannes avatar
    66 posts
    Member since:
    Dec 2012

    Posted 16 Aug 2013 Link to this post

    On my RadMap I have some InformationLayers and one of them is showing some objects as MapShape type "MapLine". Point1 and Point2 are set so the lines are displayed correctly. Now I have to extend those lines.

    Our customer wants to see little bubbles at start and end point of each line. It seems a combination of MapShapes is not possible inside ItemTemplate so using one "MapLine" and two "MapEllipse" objects is not possible, right? As far as I understand the documentation one possibility is to use a single MapShape (that's what I currently have) and the other is using a FrameworkElement. But I cannot use FrameworkElement because those objects do not have Properties for RadMap like Point1/Point2 or Location.

    ItemTemplate now:
        Visibility="{Binding Visibility}"
        StrokeThickness="{Binding LineThickness}"
        Point1="{Binding Point1}"
        Point2="{Binding Point2}" />

    What I expected as solution but didn't found:

        <tel:MapEllipse tel:MapLayer.Location="{Binding Point1}" />
          Visibility="{Binding Visibility}"
          StrokeThickness="{Binding LineThickness}"
          Point1="{Binding Point1}"
          Point2="{Binding Point2}" />
        <tel:MapEllipse tel:MapLayer.Location="{Binding Point2}" />
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 21 Aug 2013 Link to this post

    Hello Johannes,

    Unfortunately those figures can't be created inside the data template using InformationLayer. It can be created in the code behind or in XAML. For example:

    <telerik:MapPath Fill="#AF00FF00" Stroke="Blue" StrokeThickness="2">
                <telerik:MapEllipseGeometry Center="36.5,-121.5"
                    <telerik:MapPathFigure StartPoint="36.5,-121.5">
                        <telerik:MapLineSegment Point="35.6,-119.8" />
                <telerik:MapEllipseGeometry Center="35.6,-119.8"

    Unfortunately MapPath objects do not support binding inside geometry group or segments.

    Andrey Murzov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top