ComponentOne Maps for WinForms
Working with Map Control / Adding Markers / Adding Shape Marker
In This Topic
    Adding Shape Marker
    In This Topic

    For adding the in-built shape markers, you first need to add VectorPlacemark on the surface of the map. On adding the VectorpPlacemark, you can easily customize the marker. The following code can be used to add a marker on a map and set the shape and size of the marker:

    Dim vl = New C1.Win.Map.VectorLayer()
    C1Map1.Layers.Add(vl)
    
    Dim placemark = New C1.Win.Map.VectorPlacemark()
    placemark.Geometry = New GeoPoint(20, 20)
    vl.Items.Add(placemark)
    placemark.Marker.Shape = MarkerShape.Star
    placemark.Marker.Size = New SizeF(30, 30)
    
    var vl = new C1.Win.Map.VectorLayer();
    c1Map1.Layers.Add(vl);
    
    var placemark = new C1.Win.Map.VectorPlacemark();
    placemark.Geometry = new GeoPoint(20, 20);
    vl.Items.Add(placemark);
    placemark.Marker.Shape = MarkerShape.Star;
    placemark.Marker.Size = new SizeF(30, 30);
    

    The map with a shape marker will look similar to the image given below.

    Map with shapemarker