I load a VectorLayer which contain coordinate location point.
Now, I have a VectorLayer and I would like to get the point location on a item of this layer in order to center a map to this point.
Is it possible ?
var provider = vectorLayer.DataSource; var geometry = p.GetGeometryByID(fid); var location = geometry.Centroid.Coordinate; //map.Center = location; mapBox1.Map.Center = location; mapBox1.Refresh();
I am not familiar with sharpmap, but from the available documentation I guess you could do as follows:
Probably (1) can be achieved by calling something like
new Envelope(-9.205626, -9.123736, 38.690993, 38.740837)
with the point coordinates as parameters. Or maybe the Point object has a