May 1, 2012 at 11:50 PM
Edited May 2, 2012 at 4:08 AM
Hey sorry for the late reply,
My code is now this:
private void mapImg_MouseUp(SharpMap.Geometries.Point WorldPos, MouseEventArgs e)
SharpMap.Geometries.Point p = _sharpMap.ImageToWorld(e.Location);
SharpMap.Data.FeatureDataSet ds = new SharpMap.Data.FeatureDataSet();
var vl = _sharpMap.Layers as ICanQueryLayer;
var bindingbox = p.GetBoundingBox();
if (vl != null)
if (ds.Tables.Count > 0)
var fdt = ds.Tables;
var fdr = fdt.Rows;
var fid = fdr.ItemArray;
_sharpMap.Center.X = p.X;
_sharpMap.Center.Y = p.Y;
Made a minor change just to get the ID, but for every area of the map I click on it gives me the same ID. I assume it's due to the query not selecting the area properly...
How can I make this so it will get me a different value for each area (/polygon) I click on? Just to give you a visual understanding too, each area inside the boarder has an ID. That's what I'm trying to find.
Heres the Image: http://www.imageurlhost.com/images/h8tf8k3ijgrezvaby1q.jpg
Thanks for your help so far, getting so close!