Is it possible to add tooltip to the image in a SharpMap

Topics: General Topics
Oct 13, 2006 at 1:45 PM

Hello,

I am able to place an image on the map by converting it into Bitmap image but I am unable to add the tooltip for it.

here is the code how I have added the dynamic image on the SharpMap.

MultiPoint multiPoint = new MultiPoint();
multiPoint.Points.Add(pointClicked);

SharpMap.Data.Providers.GeometryProvider geometryProvider = new SharpMap.Data.Providers.GeometryProvider(multiPoint);

SharpMap.Layers.VectorLayer laySelected = new SharpMap.Layers.VectorLayer("street_polyline");

laySelected.Style.Line = new Pen(Color.Black, 3);
laySelected.DataSource = geometryProvider;
laySelected.Style.Fill = new SolidBrush(Color.Blue);
laySelected.MaxVisible = 10000;
laySelected.SRID = 4326;
laySelected.Enabled = true;
laySelected.Style.Symbol = new Bitmap(HttpContext.Current.Server.MapPath(@"CAB2.JPG"));
laySelected.Style.SymbolScale = 0.8f;
myMap.Layers.Add(laySelected);

ViewState.Add("mapCenter", myMap.Center);
CreateMap();

plz send some sample code for displaying text on the Bitmap Image using tooltip