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

multy part hot spot map item

4 Answers 63 Views
Map
This is a migrated thread and some comments may be shown as answers.
Javor
Top achievements
Rank 1
Javor asked on 14 Aug 2017, 08:54 PM
I try this but they don't position on right place
01.<telerik:InformationLayer ItemsSource="{Binding MapItems}">
02.               <telerik:InformationLayer.ItemTemplate>
03.                   <DataTemplate>
04.                       <Grid>
05.                           <Ellipse Width="35" Height="35" Name="HotSpot1" Fill="Red" telerik:MapLayer.Location="{Binding Location}"
06.                                telerik:MapLayer.ZoomRange="5,20"
07.                                telerik:MapLayer.MaxScale="5"
08.                                telerik:MapLayer.MinScale="1">
09.                               <telerik:MapLayer.HotSpot>
10.                                   <telerik:HotSpot X="0.5" Y="0.5" ElementName="HotSpot1" />
11.                               </telerik:MapLayer.HotSpot>
12.                           </Ellipse>
13.                           <TextBlock Text="{Binding Text}" Name="HotSpot2" telerik:MapLayer.Location="{Binding Location}"
14.                                telerik:MapLayer.ZoomRange="5,20"
15.                                telerik:MapLayer.MaxScale="5"
16.                                telerik:MapLayer.MinScale="1">
17.                           <telerik:MapLayer.HotSpot>
18.                               <telerik:HotSpot X="0.5" Y="0.5" ElementName="HotSpot2" />
19.                           </telerik:MapLayer.HotSpot>
20.                           </TextBlock>
21.                         
22.                       </Grid>
23.                   </DataTemplate>
24.               </telerik:InformationLayer.ItemTemplate>
25.           </telerik:InformationLayer>

4 Answers, 1 is accepted

Sort by
0
Javor
Top achievements
Rank 1
answered on 14 Aug 2017, 09:01 PM
It is possible to make hot spot with multi part maybe more than 2 part ?
0
Javor
Top achievements
Rank 1
answered on 14 Aug 2017, 09:32 PM
Like this
0
Martin Ivanov
Telerik team
answered on 17 Aug 2017, 05:38 PM
Hello Javor,

I will check this a bit later and see if I can suggest you a solution for this scenario.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Martin Ivanov
Telerik team
answered on 22 Aug 2017, 10:11 AM
Hello Javor,

The HotSpot element should be set only on the root element in the ItemTemplate. The same applies also for the Location attached property. Currently, the Location is set on two elements which are deeper in the logica elements hierarchy of the ItemTemplate. This is why on my side the element wasn't displayed at all.

So, in summary you can have only a single HotSpot per root UI element. 

To achieve your requirement you can use only an ItemTemplate without the hot spot. I prepared a small example demonstrating this approach. I hope it helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Map
Asked by
Javor
Top achievements
Rank 1
Answers by
Javor
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or