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

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

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


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();

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 using tooltip