This project has moved and is read-only. For the latest updates, please go here.

How to add a tooltip to multipoimt in a SharpMap

Oct 25, 2006 at 1:48 PM

I am using SharpMap file version
Here, my problem is:

I am able to place an image on the map by converting it into Bitmap image dynamically 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();

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;

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

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