Create popups on mouseenter

2 posts, 1 answers
  1. Joshua Ault
    Joshua Ault avatar
    7 posts
    Member since:
    Mar 2010

    Posted 16 Apr 2010 Link to this post

    Hello:

    I am building a map control using the Telerik RadMap. I have the map displaying with pushpins being displayed on the map. Now my problem is, when the mouse hovers over a pushpin, I need to have a popup appear right off of the pin. I have created the popup, but for some reason the popup is appearing in the top left corner of the screen. Is there any examples or suggestions for this?

    Thank You,
    Josh
  2. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 19 Apr 2010 Link to this post

    Hi Joshua Ault,

    I would recommend using the standard Silverlight tool tip service for this purposes. For example:

    private void MapMouseClick(object sender, MapMouseRoutedEventArgs eventArgs)
    {
        Location location = eventArgs.Location;
        Pushpin pushpin = new Pushpin();
        MapLayer.SetLocation(pushpin, location);
        ToolTip tooltip = new ToolTip()
        {
            Content = string.Format("Lat: {0:F3}, Lon: {1:F3}", location.Latitude, location.Longitude)
        };
        ToolTipService.SetToolTip(pushpin, tooltip);
        this.informationLayer.Items.Add(pushpin);
    }


    Simply use your popup as content of the tool tip object.

    Best wishes,
    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.
  3. DevCraft banner
Back to Top