IDEA
|
Note that it would be nice if the line had measures (M values) for these to be able to be taken into account in controlling how the gradient is mapped to the line, for example if the M at the start of the line was 0 and the M at the end of the line was 1 (with monotonicity) that placing a vertex at the middle of the line with an M value like 0.8 would cause the gradient to 'flow' quicker so that instead of getting half way through the gradient it got 80% through by the midpoint. Splitting the line in the middle then would assign M values (linearly interpolated) so that splitting the line may retain the gradient (the first half going from 0 to 0.8 and the second going from 0.8 to 1 on the gradient. Alternatively the 'curves' of the gradient could be adjusted, but that would change would apply globally to all features (using this symbol) rather than be controllable by feature (as the above measure approach could).
... View more
09-29-2020
02:17 PM
|
0
|
0
|
7706
|
POST
|
wpf - Pushing read-only GUI properties back into ViewModel - Stack Overflow
... View more
08-03-2020
11:29 AM
|
0
|
0
|
1411
|
POST
|
I believe there is an error in this code as AddGraphicToMap returns a Task<IDisposable> which is apparently being converted to an IDisposable (PtGraphic) when what you want to do is await the Task to extract the IDisposable that results, you can do this by marking the lambda you pass to QueuedTask.Run as 'async' and then add 'await' on the call to AddGraphicToMap. There were some timing related bugs in this area installed during 2.6 development. Also I believe you should consider using DelayedInvoker https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic10949.html so you don't handle every mouse move event but throttle to handle mouse move events as fast as they can be processed.
... View more
06-04-2020
07:50 AM
|
0
|
2
|
1659
|
POST
|
Thanks for the info. I'll try to generate a repro case based on this info. I had been assuming that your tool had awaited the completion of the Task<IDisposable>'s returned by AddOverlay and thus they had completed and the IDisposable's representing the overlay were recorded in the tool prior to deactivating the tool. We can confirm this is the problem if you find that your abandoned overlay's go away if you reactivate and deactivate your tool as they will by then be waiting in the Tool to be cleaned up on the now second deactivation. I can make some changes to the MapTool to account for this possibility, and ensure that any overlays that don't get added until after your tool is deactivated are immediately removed.
... View more
02-20-2020
09:12 PM
|
1
|
0
|
1280
|
POST
|
The various AddOverlay & UpdateOverlay methods on MapTool keep a handle to all the graphics that that MapTool has placed on the MapVIew and automatically removes them from the view when the tool is deactivated. If you instead use the corresponding (extension) methods on the MapView itself then the MapTool cannot track them and garbage collect for you so you are responsible for holding onto them and disposing of them at the appropriate time. If you are experiencing a bug with the MapTool version of these commands please let us know so we can investigate and fix. If you are experiencing problems with the MapView version you can post some of your code to help us debug what may be going wrong in your logic. There is no way to currently find all overlays on the MapView (code that adds them is responsible for removing them appropriately) other than that closing and reopening a new MapView is the only thing I can suggest to approximate this behavior. Thanks
... View more
02-18-2020
05:48 PM
|
0
|
0
|
1280
|
POST
|
Another, potentially faster, way of doing this, without any splits or merges, would be based on pairing polygons. Say you want to align polygons in the 'red' layer to the 'green' layer (for lack of better terminology) one way is to find a label point for each green and red polygon (Feature to Point, inside), for every red point (corresponding to a red polygon) find the nearest green point and match the corresponding polygons (red polygon to the green polygon which has a label point closest to the red polygon's label point) and then transfer the geometry of the green polygon to the red polygon. For safety you can verify that the mapping is one to one (no to red polygons choose the same green one) and flag any red polygons that match to a conflicting green polygon (you could merge them if desired). If the shifts are large, the label points may shift too much and this won't work well, but if it works it is considerably less work than a bunch of splits & merges.
... View more
01-24-2020
02:22 PM
|
1
|
13
|
1078
|
POST
|
Per this Stack Overflow thread... c# - Implementing Custom XML Serialization/Deserialization of compound data type? - Stack Overflow You may want to mark your SpatialReference (& other ArcGIS Pro objects) as [XmlIgnore]
public SpatialReference NewLayerSpatialRef
and then add a string version along side... [XmlAttribute] public string NewLayerSpatialRefValue { get => NewLayerSpatialRef.ToXML(); } Deserializtion should be similar, taking the string and calling the appropriate builder type's FromXML static member. Of course, if you have some non-serializable object; for example a feature, you would want to either serialize a primary key to it (OID), along with a reference to its datasource location, or a snapshot of its current attributes, depending on your needs. Using this method, your serialized XML will have a string property with another XML fragment inside it rather than a 'nicer' looking direct XML sub-tree merge. I would imagine there is some way of getting the latter behavior, but I'm not familiar with the .NET serialization libraries to get that effect and it would provide much benefit unless that was the format required by the client parsing the XML.
... View more
01-14-2020
09:23 AM
|
0
|
0
|
1206
|
POST
|
To the caller of this function they see different results in that the first version the returned Task isn't complete until the GP tool is finished executing, while in the second version the Task is complete as soon as the GP tool has been scheduled for execution (not yet complete). ExecuteToolAsync doesn't particularly care whether it is called on the UI thread or the background thread but in the second version since the Task it returns is never either awaited or returned to the caller it is never observed. If this Task were to throw an exception it would not be observed until the Task was garbage collected and its Finalizer ran, which would trigger Pro to crash (unobserved exception re-thrown from finalizer thread where no one will handle it). Compare to the first version where if the caller awaited the completion of the returned Task<bool> in a try/catch block it could catch and handle this exception and potentially keep the application from crashing.
... View more
01-03-2020
03:42 PM
|
2
|
1
|
870
|
POST
|
I believe that this was fixed during 2.5 development.
... View more
11-18-2019
07:04 PM
|
3
|
3
|
4392
|
POST
|
We are working on a sample to help explain use, in the meantime I believe I can give you a couple hints... We always use this with a new (empty) inspector created with isFeatureEdiitng = false and if you call Load or LoadSchema on it after adding fields it would just overwrite the fields you have added so just add the fields you want explicitly. After setting up the inspector we usually are done Adding more fields by the time we create the EmbeddableControl and show it on the UI. Adding after the view is being shown should work but is not currently utilized, so may be buggy. You will then need to read whatever values out of the Inspector and do whatever you want with them at some point. Tasks and Parcels use this internally and Create features uses a variant of it (but since it has access to internal methods it uses some features not exposed publicly).
... View more
11-14-2019
12:13 PM
|
1
|
0
|
1590
|
POST
|
The 'classic' snapping in ArcMap presents a different (decoupled) UI for controlling snapping order (which was actually FC based rather than layer based). The updated snapping (introduced at 10.0, on which the Pro snapping is loosely based) takes similar steps to couple layer draw order with snapping order. Currently there isn't a UI mechanism for snapping to overload Contents pane layer order to mean anything other than draw order and there isn't a way for the snapping engine to process layers in an order other than draw order. Architecturally this won't be the most straightforward change to make involving at least 3 different teams. In the meantime, you could 'fake' this by duplicating your layers in the snapping order you want and give them 100% transparent symbology and only have these layers as snap-able while your visualization layers are not snappable (although referencing the same data that is).
... View more
11-05-2019
01:50 PM
|
0
|
0
|
1084
|
POST
|
PropertyChangedBase is an abstract base class, from which you may derive your VM classes; it implements INotifyPropertyChanged which is a .NET interface which just provides an event which clients can listen to in order to receive notification about properties changing (views via data binding will use this event to receive notification that the VM has changed). As PropertyChangedBase provides additional help in firing this event (via NotifyPropertyChanged & SetProperty helpers) you can make use of it as long as you don't have another class to inherit from. As C# only allows for single inheritance though if you need to inherit from a different base class for any reason (that doesn't itself implement INotifyPropertyChanged) than although you cannot also inherit from PropertyChangedBase you can implement the INotifyPropertyChanged interface and still provide the needed interface so that binding in WPF views works as expected. Aside from providing the NotifyPropertyChanged & SetProperty methods to help with firing PropertyChanged events and thus forming the base class of the other ArcGIS Pro framework classes (DockPane, Tool, Command etc) there is not anything 'special' about its implementation of INotifyPropertyChanged.
... View more
10-28-2019
08:55 AM
|
1
|
0
|
1663
|
POST
|
Try esri_mapping_selection2DContextMenu & esri_mapping_selection3DContextMenu for 2D & 3D map views respectively... see... arcgis-pro-sdk/Editing.daml.xml at master · Esri/arcgis-pro-sdk · GitHub for example DAML changes (search for this menu)
... View more
10-23-2019
10:33 PM
|
1
|
2
|
1091
|
POST
|
In addition to the sample above you may want to make use of QueryDisplayExpressions (on both BasicFeatureLayer & StandaloneTable through ArcGIS.Desktop.Mapping.IDisplayTable) as this will retrieve the display expression strings for features (by ObjectID) that is meant to be the canonical string representation of that feature for use in UI (and is controlled by a layer defined script). Perhaps this sample could be enhanced to use this approach.
... View more
08-01-2019
08:04 AM
|
1
|
0
|
1299
|
POST
|
Berend, glad you were able to make progress could you clarify what you really needed (which you already had apparently) in place of the requested functionality and how that was a more reasonable solution to your problem?
... View more
05-24-2019
07:50 AM
|
0
|
1
|
835
|
Title | Kudos | Posted |
---|---|---|
1 | 10-23-2019 10:33 PM | |
1 | 08-01-2019 08:04 AM | |
1 | 02-20-2020 09:12 PM | |
1 | 01-11-2019 03:02 PM | |
1 | 11-14-2019 12:13 PM |
Online Status |
Offline
|
Date Last Visited |
4 weeks ago
|