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

Create popups on mouseenter

1 Answer 88 Views
Map
This is a migrated thread and some comments may be shown as answers.
Joshua Ault
Top achievements
Rank 1
Joshua Ault asked on 16 Apr 2010, 06:00 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 19 Apr 2010, 04:27 PM
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.
Tags
Map
Asked by
Joshua Ault
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or