MapPinPoint disappears on browser resize

3 posts, 0 answers
  1. Scott Michetti
    Scott Michetti avatar
    92 posts
    Member since:
    Feb 2010

    Posted 15 Sep 2011 Link to this post

    Hello. I'm adding a MapPinPoint to the information layer. However, if I resize the browser window, the pinpoint disappears. This was working in the Silverlight 3 version of the RadMap control, but is not working in the Silverlight 4 version. Here's my code. Maybe I need to change my code.


    public ContentHolder()
                radMap1.UseSpringAnimations = false;
                radMap1.MouseClickMode = MouseBehavior.None;
                radMap1.MouseDoubleClickMode = MouseBehavior.None;
                radMap1.Provider = new OpenStreetMapProvider();
                radMap1.ZoomLevel = 3;        

            private void AddPoints()
                MapPinPoint pinPoint = new MapPinPoint();
                pinPoint.Cursor = Cursors.Hand;
                pinPoint.ImageSource = new BitmapImage(new Uri(@"/Images/PushPin3.png", UriKind.Relative));          
                MapLayer.SetLocation(pinPoint, new Location(20.00, 1.00));

    <Grid x:Name="LayoutRoot">
            <telerik:RadMap  HorizontalAlignment="Stretch"  Margin="0,0,0,0" Name="radMap1" VerticalAlignment="Stretch">
                <telerik:InformationLayer Height="100" HorizontalAlignment="Left" Margin="298,290,0,0" Name="MyInformationLayer" VerticalAlignment="Top" Width="200" />

  2. Andrey
    Andrey avatar
    1681 posts

    Posted 20 Sep 2011 Link to this post

    Hi Scott Michetti,

    You must not use any size/position attributes (like Width/Height, HorizontalAlignment, Margin and so on) in InformationLayer element. It brakes all functionality. Your XAML should look like the following:

    <Grid x:Name="LayoutRoot">
       <telerik:RadMap  HorizontalAlignment="Stretch" 
          <telerik:InformationLayer Name="MyInformationLayer" />

    Kind regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
  4. Scott Michetti
    Scott Michetti avatar
    92 posts
    Member since:
    Feb 2010

    Posted 21 Sep 2011 Link to this post

    Thanks Andrey. That fixed the problem.
Back to Top