|
Currently i'm doing something like this: private void mapControl_ClickEvent(object sender, AxManifold.Interop.IComponentControlEvents_ClickEvent e) { string componentName = "Drawing1"; string wkt = String.Format("POINT ({0} {1})",e.pArgs.LocationNative.X.ToString(),e.pArgs.LocationNative.Y.ToString()); string sql = "UPDATE [{0}] SET [Selection (I)] = True WHERE " + "TOUCHES(ID, Buffer(AssignCoordSys(CGeom(CGeomWKB(""{1}"")), CoordSys(""{0}"" AS COMPONENT)),{2}))", componentName, wkt, mapControl.ScaleAbsolute * .001); Manifold.Interop.Query tempQuery = mapControl.get_Document().NewQuery("", false); tempQuery.Text = sql; tempQuery.Run(); mapControl.get_Document().ComponentSet.Remove(tempQuery); mapControl.Refresh(); } You'll just have to make sure that mapControl.RenderSelection is set to true either thru code or the control's property.
ghelo.arboleda namria, philippines ghelobytes@yahoo.com |