MapPinPoint no longer contains Hotspot property

7 posts, 0 answers
  1. Felician Balint
    Felician Balint avatar
    5 posts
    Member since:
    May 2009

    Posted 11 Nov 2010 Link to this post

    I've just downloaded Q3 and noticed just one error when rebuilding the app (which is excellent). Unfortunately it's related to this property and I haven't found out where Hotspot property went.

    Does anybody have any idea if Hotspot still exists or how I can replace it? (Hotspot class still exists just I have no idea how to set a hotspot for a pinpoint anymore)
  2. Alexey Oyun
    Alexey Oyun avatar
    74 posts
    Member since:
    Mar 2010

    Posted 12 Nov 2010 Link to this post

    Hi,

    Got same problem, just updated to Q3.
    And now HotSpot in map does not respect size, location, zoomrange, basezoomlevel.

    Simply, it is just not working.

    Any update on how to fix it, or at least documentation, since right now documentation for map shows "An error occured while processing your request. "

    Any help?

    Alexey.
  3. DevCraft banner
  4. Alexey Oyun
    Alexey Oyun avatar
    74 posts
    Member since:
    Mar 2010

    Posted 12 Nov 2010 Link to this post

    Hi,
    I have solved my problem.

    In Q2 I was using Map:MapLayer.Location in template:
    <DataTemplate x:Key="HotSpotTemplate">
                    <Border Cursor="Hand"
                                    Map:MapLayer.BaseZoomLevel="{Binding Path=BaseZoomLevel}"
                                    Map:MapLayer.Location="{Binding Path=Location, Converter={StaticResource Test}}"
                                    Map:MapLayer.ZoomRange="{Binding Path=ZoomRange}">

    No, I am using Information layer data mapping:
    <Map:InformationLayer Name="hotSpotInformationLayer"
                                                        ItemTemplate="{StaticResource HotSpotNew}"
                                                        ItemsSource="{Binding HotSpots}">
                <Map:InformationLayer.DataMappings>
                    <Map:DataMapping FieldName="Location" ValueMember="Location"/>
                    <Map:DataMapping FieldName="BaseZoomLevel" ValueMember="ZoomLevel"/>
                    <Map:DataMapping FieldName="ZoomRange" ValueMember="ZoomRange"/>
                </Map:InformationLayer.DataMappings>
            </Map:InformationLayer>
            <Map:InformationLayer Name="bubbleInformationLayer"
                                                        ItemTemplate="{StaticResource BubbleTemplate}"
                                                        ItemsSource="{Binding Bubbles}">
            </Map:InformationLayer>

    Hope, will help someone.

    Thanks, Alex
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 12 Nov 2010 Link to this post

    Hi Felician Balint,

    We've made behavior of the hot spot on MapPinPoint more consistent with other framework elements. You can set it as attachable property:

    MapPinPoint pinPoint = new MapPinPoint();
    pinPoint.Text = "My pin point";
    MapLayer.SetLocation(pinPoint, new Location(0, 0));
    HotSpot hotspot = new HotSpot()
    {
        X = 0,
        Y = 0
    };
    MapLayer.SetHotSpot(pinPoint, hotspot);


    Regards,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Nemanja
    Nemanja avatar
    27 posts
    Member since:
    Mar 2011

    Posted 07 Dec 2012 Link to this post

    Hi Andrey,

    How would one do this in XAML? 

    We're struggling to set the position of our pin point as they are being positioned a bit too low instead of on the exact location point. This is the code we use to set it up. The values we enter in the X and Y values of the hotspot make no difference at all. 

    Even if the values are huge like 500000 or 0.5 it looks the same...

    <telerik:InformationLayer ItemsSource="{Binding Stores, Mode=TwoWay}">
                <telerik:InformationLayer.ItemTemplate>
                  <DataTemplate>
                    <telerik:MapPinPoint telerik:MapLayer.Location="{Binding Location}"
                                         telerik:RadToolTipService.IsEnabled="True"     
                                         telerik:RadToolTipService.Placement="Right"
                                         VerticalAlignment="Top"
                                         ImageSource="maps.png"
                                         ImageScale="1.5" >
                      <telerik:MapPinPoint.ToolTip>
                        <ToolTip Style="{StaticResource ToolTipStyle}"/>
                      </telerik:MapPinPoint.ToolTip>
                      <telerik:MapLayer.HotSpot>
                        <telerik:HotSpot X="0.5" Y="0" />
                      </telerik:MapLayer.HotSpot>
                    </telerik:MapPinPoint>
                  </DataTemplate>
                </telerik:InformationLayer.ItemTemplate>
              </telerik:InformationLayer>



    Thanks,
    Nemanja
  7. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 12 Dec 2012 Link to this post

    Hi Nemanja,

    Thank you for the feedback.
    There is a problem with using MapLayer.HotSpot property for the MapPinPoint control when the MapPinPoint is used in DataTemplate. In fact this problem occurs only in WPF version of RadMap. We have created the PITS issue to avoid this problem in future versions of our control. You can track it using the following link:
    http://www.telerik.com/support/pits.aspx#/public/wpf/13705

    As workaround you can use simple template which uses Image control instead of the MapPinPoint. You can use a fixed size for the image instead of using the MapPinPoint.ImageScale property. The sample code is below.

    <DataTemplate>
        <Grid telerik:MapLayer.Location="{Binding Location}"
              telerik:RadToolTipService.IsEnabled="True"    
              telerik:RadToolTipService.Placement="Right">
            <Grid.ToolTip>
                <ToolTip Style="{StaticResource ToolTipStyle}"/>
            </Grid.ToolTip>
            <telerik:MapLayer.HotSpot>
                <telerik:HotSpot X="0.5" Y="0"/>
            </telerik:MapLayer.HotSpot>
            <Image Width="24" Height="24"
                   Source="maps.png" />
        </Grid>
    </DataTemplate>

    All the best,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. Nemanja
    Nemanja avatar
    27 posts
    Member since:
    Mar 2011

    Posted 12 Dec 2012 Link to this post

    Hi Andrey,

    Thanks for the workaround, I managed to get the right behaviour this way with a bit of fiddling with the X and Y values, but it works well now.

    Nemanja
Back to Top
DevCraft banner