|
POST
|
Hi, I have a tool where the user clicks on the map and my code goes off and does a long running task. However the UI is still responsive which is fine most of the time, but in this case I don't want the user to start clicking all over the map and stacking lots of queries. I want to disable further interaction with the map and change the cursor from crosshair to a wait cursor. When the task is finished I want to go back to the crosshair and allow interaction with the map again. Is this possible?
... View more
06-01-2020
11:31 AM
|
0
|
0
|
538
|
|
POST
|
Hi Uma, Thanks for getting back to me. This is disappointing for us, I really do hope ESRI fix this sooner rather than later as it is hampering and degrading the user experience for our add in. Anyway fingers crossed. Kind regards Simon.
... View more
05-15-2020
01:31 AM
|
1
|
2
|
2497
|
|
POST
|
Hey thanks Wolf. I have been over those resources - so I was just checking my thinking here. So basically I want to keep down the amount of times I make an explicit call to QueuedTask.Run() - and essentially wrap all my code into it including any Pro API calls that need to be run on the MCT thread? (but leaving out calls specific to the GUI as they have to be run on the GUI thread).
... View more
05-13-2020
02:39 PM
|
0
|
1
|
8572
|
|
POST
|
Hi, I'm a bit confused about how to properly use QueuedTask.Run(). If I have two or more API calls that require to be run on the MCT - do I wrap each of those calls individually into a QueuedTask.Run()? Or can I wrap all the calls under one giant QueuedTask.Run()? I am puzzled more, if I am to also allowed to wrap my own business logic under the QueuedTask.Run along with actual Pro SDK API calls that absolutely MUST be run under QueuedTask.Run(). Is this a bit of no no? So lets look at some code: if (map != null && isOverwriteMaps) { CloseMap(map.Name); await CleanMap(map); } else { await QueuedTask.Run(() => { map = MapFactory.Instance.CreateMap(mapName, MapType.Map, MapViewingMode.Map, Basemap.None); }); await QueuedTask.Run(() => { map.SetSpatialReference(SpatialReferenceBuilder.CreateSpatialReference(4326)); }); } So I am using QueuedTask.Run three times - can I just use it once and wrap the whole thing or I right to use it for each individual case? I think you have to be careful to run big blocks of code within QueuedTask.Run in case there is a call that requires it to be run on the GUI thread. Am I right in my thinking here?
... View more
05-13-2020
11:32 AM
|
0
|
4
|
8769
|
|
POST
|
Hi Uma, I've tried : var layerDoc = new LayerDocument(portalItemUrl); with the portal item (which is a .lyrx file) and it returns null. Is there any way to make the code that you outlined in your answer work with portal layer items? Kind regards.
... View more
05-13-2020
12:44 AM
|
0
|
0
|
2497
|
|
POST
|
Hi, Does the Pro SDK (the XAML) provide the ability to implement the red asterisk for a field that needs to be filled out. Also the info icon with associated tool tip pop out when hovering over icon. Or was this implemented by crafting standard WPF controls/images with animation events/triggers etc? See the visual below, which is the effect I am trying to achieve:
... View more
04-28-2020
05:46 AM
|
0
|
0
|
467
|
|
POST
|
This is a basic question - but seem to be having a hard time getting an answer from the online help. I want to set a coordinate system when I make a new map pane. You cannot seem to specify when you use the MapFactory and once the map is made the SpatialReference property is readonly. Could someone point me in the right direction to change or set the spatial ref of a map.
... View more
04-25-2020
03:54 AM
|
0
|
3
|
1185
|
|
POST
|
I'll be honest - it kind of blows my mind what's going on here!
... View more
04-23-2020
10:53 AM
|
0
|
1
|
3464
|
|
POST
|
I have found that if I search for a layer file and include the .lyrx suffix to the search string parameter it brings back 1 result. Which is fine - but I have put a constraint to bring back "Layer Files" only. So this kind of makes the constraint for "Layer Files" superfluous. I'm not happy with the search algorithm here.
... View more
04-23-2020
01:27 AM
|
0
|
0
|
1385
|
|
POST
|
This is a bit rubbish - I can't believe this is the only solution.
... View more
04-23-2020
01:17 AM
|
0
|
0
|
1385
|
|
POST
|
I've created a dockpane that adds layers to a new map pane - this can be a long running process. I think a progressbar would be nice for the user to see how things are going. What is the ESRI way or best way of doing things like this? Put a ProgressBar control on the dockpane? Or have a ProgressDiaglog popup? I see no concrete examples using the standard WPF ProgressBar control on ESRI GitHub, only the ProgressDialog - which is the main reason I am asking the question.
... View more
04-22-2020
03:49 AM
|
0
|
3
|
3551
|
|
POST
|
The example looks like it only works with physical layer files on disk - however I am working with layer files from the portal and they com back as type Core.Item. Does this work with portal layer items? and can I position/set the index of the layer in the contents? like I can with the one of the overrides on the CreateLayer().
... View more
04-22-2020
01:19 AM
|
0
|
4
|
2497
|
|
POST
|
Well you could - but how do you know the item id up front? Don't you have to find the item first then store away the ID somehow? Then use that in the future searches. If you do that but update the layer file at some point the ID will change as well. So that will cause a problem. Is this the only way?
... View more
04-21-2020
01:47 PM
|
0
|
1
|
1385
|
|
POST
|
If I need one thing from Portal is there a way to search for it explicitly - at the moment the search result brings back a multitude of things that sound like the item I am searching for (happens to be a layer file) and also includes the actual thing I am looking for. Ideally I want either 0 or 1 item returns so I know either that search result returned successfully or not. This is the code I'm using where I am hoping that the "search" should work in the way that I explained above: public static async Task<List<AgolLayer>> GetAgolLayersAsync(int numberOfResults, string search = "")
{
var portal = ArcGISPortalManager.Current.GetActivePortal();
List<AgolLayer> agolLayers = new List<AgolLayer>();
if (portal.IsSignedOn())
{
var query = PortalQueryParameters.CreateForItemsOfTypes(new List<PortalItemType>() { PortalItemType.Layer }, "", Module1.GroupID, search);
query.Limit = numberOfResults;
//Loop until done
var portalItems = new List<PortalItem>();
while (query != null)
{
//run the search
PortalQueryResultSet<PortalItem> results = await portal.SearchForContentAsync(query);
portalItems.AddRange(results.Results);
query = results.NextQueryParameters;
}
foreach (dynamic item in portalItems)
{
AgolLayer agolLayer = new AgolLayer(item);
if (agolLayer.IsValidLayer)
{
agolLayers.Add(agolLayer);
}
}
}
else
{
Debug.WriteLine("User not signed in - so layers cannot be retrieved.");
}
return agolLayers;
}
... View more
04-21-2020
09:59 AM
|
0
|
6
|
1452
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 12-18-2023 10:11 AM | |
| 1 | 08-22-2025 02:27 AM | |
| 2 | 12-19-2023 01:36 AM | |
| 1 | 12-21-2023 04:02 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|