POST
|
Sorry for the late reply. I'm working with graphic layers and so what I wanted was to have the user be able to select multiple polygons in a layer and allow them to edit multiple shared points at a time. I can't post specific code as this is a project for a client and under NDA but I can describe what I did. The trick here was to collect a group of graphics to be edited and call EditGeometryAsync on the last graphic in that list. I use the ProgressChanged delegate to determine when a point was moved, from there I iterate all the MapPoints in the selected graphics list (minus the last one as that is the graphic being edited) and use the PolygonBuilder to generate a new polygon geometry. For each MapPoint being added to the new polygon, I'd check to see if it was within a very small distance to the edited point and if it was, I'd use MapPoint.MoveTo() to generate the new point otherwise I'd copy the original point at that location back in.
... View more
12-08-2016
10:17 AM
|
0
|
0
|
749
|
POST
|
I did not know about the new v100.0 (hell of a jump in release numbers eh? ) What I meant about locked geometry is that both RequestShapeAsync and EditGeometryAsync return Geometry.Geometry objects which are attached to Graphics. The issue is that Geometries are immutable so in order to edit it you first need to build a PolygonBuilder with the geometry, then edit it and then attach the new geometry back to the graphic. When I talk about static vs dynamic geometry, I was referring to how DirectX (and OpenGL) allow you to create geometry buffers which, I assume, has something to do with why you've decided to make geometry immutable. Not sure if that is still the case in V100.00.
... View more
11-23-2016
09:56 AM
|
0
|
2
|
749
|
POST
|
I figured this out actually. It was a combination of a few things. The biggest issue I've had so far with this SDK is that Geometries are tightly locked and can't be edited. I get that is for performance reasons but at the low level, the graphics API will allow you to create geometry buffers with different flags to determine if it should be static or dynamic and thus there should be a flag that allows us to determine that. That said, even converting a Graphic into a PolygonBuilder doesn't cut is as you can't edit the individual MapPoints so I had to call EditGeometryAsync with a progress class and track each vertex update call, from there I rebuild the geometry list each time using PolygonBuilder and move only the shared vertices. A true pain to get around the locked geometry limitation!
... View more
11-22-2016
03:23 PM
|
0
|
4
|
749
|
POST
|
Is there any way to edit multiple points at once? For my app, I'd like the user to select multiple polygon regions that all share a common vertex. I'd run the editor on one of the regions and adjust the shared vertex while the other polygon's would adjust their shared vertex to the new point. I know you can't edit geometry once it's been created but is this something the point builder is used for? Or is there another way to do this? Thanks!
... View more
11-16-2016
10:20 AM
|
0
|
6
|
1609
|
POST
|
I'm building a specialised app that allows for polygons to be drawn and part of the requirements state that when drawing a new polygon, the user should be allowed to snap points to existing polygonal regions that are with a certain range. I found this posts which helps solve how to find a point to snap to: .NET SDK snap function for feature geometry editing But I've hit a glass wall when trying to modify points as they are being created. I'm currently using a Progress delegate to catch each new vertex that has been drawn but I can't seem to do anything them. MapPoint.MoveTo does NOTHING and I can't touch the X,Y members of MapPoint either. I also tried over-riding the editor as per this post: https://community.esri.com/message/559163 But I run into the same issue with MapPoints there as well. It's like you guys don't want us to touch the geometry at all but I need to be able to solve this problem. The only soloution I see at this point is either setting the mouse cursor manually through a low-level call or writing my own editor. Any ideas would be greatly appreciated! Cheers
... View more
10-17-2016
10:43 AM
|
1
|
0
|
732
|
POST
|
Hi there, just to follow up on this. Even if we were to write our own methods to find the nearest point, is there anyway to control where the cursor is during edit mode so as to make it snap to a given point?
... View more
10-12-2016
03:37 PM
|
0
|
0
|
730
|
Title | Kudos | Posted |
---|---|---|
1 | 10-17-2016 10:43 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|