POST
|
I have tested the following code, works fine. Basically, I added a polygon drawing points to a point collection and draw them again. If I use a UI element, a textbox for example, the polygon will shift to right to some extent. However, I found this works great. var ps = e.GetPosition(null); Point aPnt = this.TransformToVisual(Map).Transform(ps); ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint = Map.ScreenToMap(aPnt); _measurPntCol.Add(mapPoint);
... View more
06-24-2011
01:07 PM
|
0
|
0
|
190
|
POST
|
I have used my own code to get the snap point and draw a blue circle onMousrMove. Seems works fine but not as that good as ESRI's one. For example, ESRI's little blue marker is transparent and the selected feature does not flashing.
... View more
12-08-2010
09:05 AM
|
0
|
0
|
166
|
POST
|
I have implemented IEngineEditSketch in a custom tool. In the OnMouseDown event handler, I can add a point to the edit sketch: engineEditSketch.AddPoint(pPoint,true); However, I don???t know how to invoke ESRI???s code to draw that blue circle in OnMouseMove event handler. Is it possible? In another word, it is possible to invoke ESRI snap function in a custom tool programmatically? The key point is how to find out a snap point?
... View more
09-22-2010
12:06 PM
|
0
|
2
|
490
|
POST
|
I found ConstructUnion method some time returning an empty geometry even all the geometries added are not empty. Could you help to find out why? Is it a known issue? // Sample code IGeometry pGeomBag = null; IGeometryCollection geometryCollection = null; pGeomBag = new GeometryBagClass(); pGeomBag.SpatialReference = objFeature.ShapeCopy.SpatialReference; geometryCollection = (IGeometryCollection)pGeomBag; //buffer each selected roads and add to geometryCollection geometryCollection.AddGeometry(objBufferResult, ref missing, ref missing); //Do construct union IPolygon polygon = new PolygonClass(); ITopologicalOperator2 objTopo = polygon as ITopologicalOperator2; if (objTopo != null) { objTopo.ConstructUnion((IEnumGeometry)pGeomBag); objTopo.IsKnownSimple_2 = false; objTopo.Simplify(); IGeometry objExclusion = new PolygonClass(); objExclusion = (IGeometry)objTopo; }
... View more
06-07-2010
11:07 AM
|
0
|
3
|
550
|
Online Status |
Offline
|
Date Last Visited |
02-17-2022
09:03 AM
|