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

Composite MapShape and custom MapShape

4 Answers 57 Views
Map
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 27 Aug 2012, 02:07 PM
Hello there,

I am currently developing a mapping application with WPF radmap for my company.
Therefore I have a question:

I have multiple arrows (WPF path shape) for which I also have locations in Lat/Lon.
I want to show these arrows on an InformationLayer, which works fine by just using MapLayer.SetLocation and InformationLayer's Items property.
My problem is now that I have a set of arrow-sets (imagine a list of tours and each tour has a set of direction arrows) and I need a 1to1 relation between objects on the information layer and my model (e.g. if a tour is deleted i want to remove the corresponding polyline and the corresponding arrows).
Is there any kind of CompositeMapShape which can have arbitrary WPF FrameworkElements (all of them have their own MapLayer location) as children?

Best regards,
Markus

4 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 30 Aug 2012, 08:01 AM
Hello Markus,

Unfortunately RadMap does not contain control like CompositeMapShape.However I suggest that you use two information layers, one for polyline and second for arrows to achieve this.
I have attached a sample solution which uses a similar approach.
I hope it helps.

All the best,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Markus
Top achievements
Rank 1
answered on 03 Sep 2012, 08:53 AM
Hello Andrey,

thanks for your answer. I think I will do it that way. But there is one more question:
Since my tour arrows are standard WPF elements I have to use the static method MapLayer.SetLocation on them.
I am wondering if this would result in a memory leak (I assume MapLayer has a static member holding the references to the WPF elements).
If so - is it possible to release the elements, e.g. with something like MapLayer.Release?

Best regards,
   Markus
0
Andrey
Telerik team
answered on 05 Sep 2012, 10:25 AM
Hi Markus,

The MapLayer doesn't have a static member holding the references to the WPF elements. This is a standard implementation of the attachable dependency property.

Greetings,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Markus
Top achievements
Rank 1
answered on 05 Sep 2012, 12:39 PM
Hi Andrey,

thanks - that's good to know.

Best regards,
Markus
Tags
Map
Asked by
Markus
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Markus
Top achievements
Rank 1
Share this question
or