I can add points to a map but I want to show an image (like a baloon or location sign) instead of the default red circle for the points. how can I do that with Sharpmap? my code to draw points is:

    Dim vlay2 As New VectorLayer("Points")
    Dim geomColl As New Collection(Of GeoAPI.Geometries.IGeometry)()
    'Get the default geometry factory
    GeoAPI.GeometryServiceProvider.Instance = New NetTopologySuite.NtsGeometryServices()
    Dim gf As GeoAPI.Geometries.IGeometryFactory = GeoAPI.GeometryServiceProvider.Instance.CreateGeometryFactory()

    geomColl.Add(gf.CreatePoint(New GeoAPI.Geometries.Coordinate(TextBox2.Text, TextBox3.Text)))
    vlay2.DataSource = New SharpMap.Data.Providers.GeometryProvider(geomColl)

1 Answer 1


I found My answer. we can do that by using:

    Dim img As Image = Image.FromFile("D:\Desktop\Pics\compass.png")
    vlay2.Style.Symbol = img

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.