PDA

View Full Version : pushpin tooltip



menaka.ca
10-11-2006, 02:38 PM
Is it possible to have a tooltip on pushpin?

I have the following code but couldn't find a way to create a tooltip onMouseOver.

Pushpin[] myPushPins = new Pushpin[fnrs.Results.Length + 2];
for(int i=2; i<fnrs.Results.Length + 2;i++)
{
myPushPins[i] = new Pushpin();
myPushPins[i].PinID = "pin" + i.ToString();
myPushPins[i].Label = fnrs.Results[i-2].FoundLocation.Entity.DisplayName;
myPushPins[i].IconName = "RedCircle" + (i-1).ToString();
myPushPins[i].IconDataSource = "MapPoint.Icons";
myPushPins[i].LatLong = new LatLong();
myPushPins[i].LatLong.Latitude = fnrs.Results[i-2].FoundLocation.LatLong.Latitude;
myPushPins[i].LatLong.Longitude = fnrs.Results[i-2].FoundLocation.LatLong.Longitude;
myPushPins[i].ReturnsHotArea = true;



//Add locations table rows
tr = new TableRow();
tc = new TableCell();
string addressstring = fnrs.Results[i-2].FoundLocation.Address.AddressLine + ", " + fnrs.Results[i-2].FoundLocation.Address.PrimaryCity + ", " + fnrs.Results[i-2].FoundLocation.Address.Subdivision + " " + fnrs.Results[i-2].FoundLocation.Address.PostalCode;
tc.Controls.Add(new LiteralControl(((i-1).ToString() + ". " + addressstring)));
tr.Controls.Add(tc);
locationstable.Controls.Add(tr);
}

Wilfried
10-12-2006, 03:53 AM
Hi,

In MouseMove event of the Map you can calculate if mouse pointer is near to a PushPin. Then you can display tooltip yourself.