ShapMap paint city in state sharp

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

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;
        objMap.Layers.Add(layer);
    }

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

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.

thanks.

using SharpMap v2.0;