ShapMap paint city in state sharp

Topics: Algorithms, SharpMap Project, SharpMap v2.0
Aug 16, 2008 at 1:47 PM

I have a sharp of a state and have the latitude and longitude of a city in this state, I would paint the city that has the latitude and longitude of a specific color

I am getting only one point mark this map

Below the code that I am using

    public void paintPointMap(Brush color, string nameLayer, double latitude, double longitude)
        SharpMap.Layers.VectorLayer layer = (SharpMap.Layers.VectorLayer)objMap.Layers.FindAll(delegate(SharpMap.Layers.ILayer l) { return l.LayerName.Equals(nameLayer); })[0];

        List<SharpMap.Geometries.Geometry> geoList = new List<SharpMap.Geometries.Geometry>();

        geoList.Add(new SharpMap.Geometries.Point(latitude, longitude));

        layer.DataSource = new SharpMap.Data.Providers.GeometryProvider(geoList);

        layer.Style.Fill = color;

Thank you
Aug 16, 2008 at 3:26 PM
Edited Aug 16, 2008 at 3:38 PM

I don't know how you can use

SharpMap.Geometries.Geometry because I don't have "Geometries" under SharpMap namespace

Am I missing some references? or you have mistaken writing/copying your code?

if I were missing the reference please refer me to it.


using SharpMap v2.0;