multy part hot spot map item

5 posts, 0 answers
  1. Javor
    Javor avatar
    11 posts
    Member since:
    Sep 2013

    Posted 14 Aug Link to this post

    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>
  2. Javor
    Javor avatar
    11 posts
    Member since:
    Sep 2013

    Posted 14 Aug Link to this post

    It is possible to make hot spot with multi part maybe more than 2 part ?
  3. Javor
    Javor avatar
    11 posts
    Member since:
    Sep 2013

    Posted 14 Aug in reply to Javor Link to this post

    Like this
  4. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1404 posts

    Posted 17 Aug Link to this post

    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.
  5. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1404 posts

    Posted 22 Aug Link to this post

    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.
Back to Top