I have a EPSG:4326 WGS 84 Shape file and I'm able to render the map using sharpmap 1.1.
What I'm trying to achieve is when I click on a generated Polygon, the clicked polygon must be filled with a color (For identification purpose) So I'm able to get the point where I click but how to use that point and query for all the point inside that polygon
so that I can color all the point which might result in coloring all the polygon.
The problem is I don't know how to do this in sharpmap version 1.1.
Previously when I was using Sharpmap 0.9 I used the below line to get all the points to color whole of the polygon.
My Data is from Sql Spatial DB hence the Row["the_geom"].
So far I've done this.(Which highlights only the point and need to add the points into Geo API collection)
Collection<GeoAPI.Geometries.IGeometry> geomColl = new Collection<GeoAPI.Geometries.IGeometry>();
GeoAPI.GeometryServiceProvider.Instance = new NetTopologySuite.NtsGeometryServices();
GeoAPI.Geometries.IGeometryFactory gf = GeoAPI.GeometryServiceProvider.Instance.CreateGeometryFactory();
SharpMap.Layers.VectorLayer mySuggestedLayer = new SharpMap.Layers.VectorLayer("Higlight");
fillcolor = shapeFillColor;
var factory = GeoAPI.GeometryServiceProvider.Instance.CreateGeometryFactory(_SRID);
var pointArraySubject = factory.CreateGeometryCollection(null);
var mySubjectLayer = new SharpMap.Layers.VectorLayer("SubjectIcon");
DataRow Row = accounts.NewRow();
for (int i = 0; i < accounts.Rows.Count; i++)
Row = accounts.Rows[i];
GeoAPI.Geometries.Coordinate PinPnt = new GeoAPI.Geometries.Coordinate();
double x = Double.Parse(Row["Xcoord_geo"].ToString());
double y = Double.Parse(Row["Ycoord_geo"].ToString());
PinPnt.X = x;
PinPnt.Y = y;
mySuggestedLayer.DataSource = new SharpMap.Data.Providers.GeometryFeatureProvider(geomColl);
mySuggestedLayer.Style.Fill = new System.Drawing.SolidBrush(fillcolor);
mySuggestedLayer.Style.EnableOutline = true;
mySuggestedLayer.SRID = _SRID;
Any help will make my day.