|
POST
|
@PreetiMaske As I noted, I found that the SymbolDisplay toolkit control lacked the ability to adjust the size. This may have changed after 100.6. Because of that issue, the control was not usable in my application. Had it worked I would have used it
... View more
04-27-2021
10:16 AM
|
0
|
0
|
3626
|
|
POST
|
@PreetiMaske is correct although I have found it a tad more complex and it depends what you mean by palette, and what you are doing it in. If your in WPF it is pretty straight forward because WPF does not have things going on behind the scenes to optimize. The basic approach is to create a Model that expose an ImageSource which can be bound to your palette in the DataTemplate. The ViewModel would contain the ObservableCollection of that Model. Which is bound to the list being used to display the palette. Then you have to get the ImageSource. Something along these lines. When the Model object is created the RuntimeImage is converted to an ImageSource. Having a .Wait() in the constructor is certainly not a best practice, but it is how I implemented. Using something like a static CreateAsync on the Model object is probably a better pattern //this is the model - the item of the collection being bound
public class SymbolItem
public SymbolItem(LegendInfo legendInfo, ...)
{
LegendInfo = legendInfo;
...
Task t = Task.Run(InitializeAsync);
t.Wait();
}
private async Task InitializeAsync()
{
//A little unclear on best way to adjust the parameters to get the image to size best
RuntimeImage runtimeImage;
if ( FeatureTable.GeometryType == GeometryType.Polyline )
{
runtimeImage = await LegendInfo.Symbol.CreateSwatchAsync(24, 24, 128f, Color.Transparent, new Polyline(new [] {new MapPoint(-10, 0), new MapPoint(10, 0) }));
}
else
{
runtimeImage = await LegendInfo.Symbol.CreateSwatchAsync(24, 24, 128f, Color.Transparent, new MapPoint(0, 0));
}
ImageSource source = await runtimeImage.ToImageSourceAsync();
//http://stackoverflow.com/questions/26361020/error-must-create-dependencysource-on-same-thread-as-the-dependencyobject-even
source.Freeze();
Dispatcher.CurrentDispatcher.Invoke(() => ImageSource = source);
}
public ImageSource ImageSource { get; set; }
...
}
In my ViewModel there is the ObservableCollection of these public ObservableCollection<SymbolItem> SymbolItems { get; set; } = new ObservableCollection<SymbolItem>(); In Xaml I bind to the ImageSource <!-- Would be nice to use this control, but have no control over image size with it -->
<!--<esritoolkit:SymbolDisplay Symbol="{Binding LegendInfo.Symbol, Mode=OneTime}" Margin="0,0,5,0" />-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding ImageSource}" />
</Grid> As noted there, the esri toolkit does have a SymbolItem but at least in 100.6 I found it did not provide enough control over sizing. In Xamarin Forms you have an added complexity in how it recycles images. That required creating custom ViewCells to handle this issue... I won't go into that at this time
... View more
04-27-2021
09:12 AM
|
1
|
1
|
3631
|
|
POST
|
To draw a shape based on user input you use the SketchEditor.StartAsyn method. There is a simple example shown on the help page https://developers.arcgis.com/net/wpf/api-reference/html/M_Esri_ArcGISRuntime_UI_SketchEditor_StartAsync.htm
... View more
04-26-2021
07:50 AM
|
1
|
2
|
2185
|
|
POST
|
ChallangeHandler gets triggered when credentials are required. If you are already calling IdentityManager.Current.AddCredential(cred); in code than credentials are not required and so the ChallengeHandler would not be called. ChallengeHandler is a nice pattern to centralize all requests for credentials in a single place, and there is no need to specifically add credentials prior to accessing a resource
... View more
04-22-2021
10:24 AM
|
0
|
0
|
2794
|
|
POST
|
This is very odd. Mind you nothing has changed in this in years. But I was noticing how it showed the region strings in the content. This is how State is setup in the view, and the user just picks a value from the dropdown <ComboBox Grid.Column="1" SelectedIndex="0" SelectedValue="{Binding State}">
<ComboBox.Items>
<ComboBoxItem Content="PA" />
<ComboBoxItem Content="WV" />
<ComboBoxItem Content="KY" />
</ComboBox.Items>
</ComboBox> But what I decided to do was make a change, because the string shown in my first post seemed odd. Previously, I just had State bound directly, but I changed it to State = ((ComboBoxItem)State).Content.ToString() After this change I am again getting valid results without needing the additional input. Based on the timing of the issue appearing and the fact that there was an April update to the geocoding service I am still going to put that update as the cause. But what it seems is that prior to the change the string System.Windows.Controls.ComboBoxItem: PA was parsed as PA. But after the update that was no longer the case. I will not argue that parsing the above string to 'PA' should have been expected behavior. Simply that evidence points to that was what was occurring. After making the change in the code things seem to be working as expeected. Thanks for the help, putting everything down and also looking at what happened with the query (and some Fiddler) pointed me where I needed to find the solution -Joe
... View more
04-19-2021
04:14 PM
|
1
|
0
|
2036
|
|
POST
|
Below is the input of a search that previously returned results and no longer does searchValues Count = 5 [0]: {[address, 375 North Shore Dr]} [1]: {[city, ]} [2]: {[region, System.Windows.Controls.ComboBoxItem: PA]} [3]: {[postal, ]} [4]: {[postalExt, ]} parameters.SearchArea {Envelope[XMin=1011246, YMin=13425000, XMax=2487548, YMax=15124138, Wkid=32167]} Depth: 0 Dimension: Area Extent: {Envelope[XMin=1011246, YMin=13425000, XMax=2487548, YMax=15124138, Wkid=32167]} GeometryType: Envelope HasCurves: false HasM: false HasZ: false Height: 1699138 IsEmpty: false MMax: NaN MMin: NaN SpatialReference: {SpatialReference[Wkid=32167]} Width: 1476302 XMax: 2487548 XMin: 1011246 YMax: 15124138 YMin: 13425000 ZMax: 0 ZMin: 0
... View more
04-19-2021
02:55 PM
|
0
|
3
|
2086
|
|
POST
|
We have an application with on-line geocoding that has been deployed for a few years and working fine. All of the sudden (seeming to correspond to the upgrade to Geocoding Service) it stopped working. We limit searches to a small geographic area and because of this have never required the users to enter a Zip or city. As stated this worked perfectly for years until the other day. Now unless a zip or city is entered we do not get a valid result. We instead get a single result returned but with all the attributes empty, and the point is just in the middle of the extent We are using Runtime version 100.6 So... before the other day Send request without city or zip code and we get a set of good results within service area at that number and street Starting a few days ago Send request without city or zip, receive single (bad) results with empty attributes located at a random location Send request with city or zip and receive the same results as before when sent without city or zip -Joe @MichaelBranscomb
... View more
04-19-2021
02:05 PM
|
0
|
5
|
2110
|
|
POST
|
I am not sure if this is the same issue, or if it has been fixed in a later version of Runtime (we are still on 100.6). But I have seen a timing issue with credentials. It is discussed a bit here: Offline Map Sync Error: Job error 6004... I am not sure if this is related but was happening when I tried to sync soon after connecting the credentials had not been been applied to everything in my offline map. So I got credentials errors. Even though I set the credentials. What I do to solve this is basically make a dummy hit against all layers before actually trying to do the real load of them. Basically I load a layer, don't worry if it gives me an error and then load the layer again and the second time the token has been properly applied. /// <summary>
/// This is used because of issue with the timing issues associated to
/// getting tokens in first sync
/// </summary>
/// <returns></returns>
private async Task InitialzeTokens(Map map)
{
if ( !_firstSync ) return;
foreach (var featureLayer in map.OperationalLayers.OfType<FeatureLayer>())
{
var pars = new QueryParameters {WhereClause = "1=0", MaxFeatures = 1};
if ( !(featureLayer.FeatureTable is GeodatabaseFeatureTable gdbFeatureTable) ) continue;
if ( gdbFeatureTable.Geodatabase?.Source == null ) continue;
var serviceFeatureTable = new ServiceFeatureTable(gdbFeatureTable.Geodatabase.Source);
try
{
await serviceFeatureTable.LoadAsync();
var _ = await serviceFeatureTable.QueryFeaturesAsync(pars);
}
catch (Exception)
{
//_log.Error(e, e.Message);
}
}
_firstSync = false;
} Also along the lines of what @JenniferNery describes. Instead of doing IdentityManager.Current.AddCredential(cred); Use the ChallengeHandler and you can see when it requests credentials //put in constructor
AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(CreateCredentialAsync);
private async Task<Credential> CreateCredentialAsync(CredentialRequestInfo info)
{
try
{
_log.Info($"CHALLENGE ********** : {info.ServiceUri} ***********");
if ( info.ServiceUri == null ) return null;
var credential = await AuthenticationManager.Current.GenerateCredentialAsync(info.ServiceUri, Settings.UserName, Settings.Password);
_log.Info($"RETURN credential *********: {info.ServiceUri} ********");
return credential;
}
catch (Exception e)
{
_log.Error(e, e.Message);
return null;
}
} Good Luck
... View more
04-16-2021
07:51 AM
|
0
|
2
|
2825
|
|
POST
|
Did you ever play around with WanderExtent to get it to change how quickly it recenters? Setting to 0 should have it continuously recentering
... View more
04-09-2021
07:49 AM
|
1
|
1
|
1267
|
|
POST
|
I can not imagine how you would possibly have a 2 GB delta file. To have a file that size would require 100s of thousands of edits
... View more
03-17-2021
11:38 AM
|
0
|
1
|
2664
|
|
POST
|
I'm looking at the documentation for API Keys https://developers.arcgis.com/documentation/security-and-authentication/api-keys/ At the bottom there is a table which lists the services Available services Followed by, Access content and items (beta) Only ArcGIS Developer accounts can use API keys to read private content. ArcGIS Organization users should use OAuth 2.0 to obtain ArcGIS identity credentials to read private user content and access services on a user's behalf. They would need to figure out how to have licensing and the API key tied together. My guess is that once they work out a plan it would have to go through an account manager to be all setup.
... View more
02-22-2021
11:41 AM
|
2
|
1
|
3291
|
|
POST
|
Based on documentation it would seem the API Key is to allow monitoring of access to services, based on the ones described those are also services that are either free or charged on a unit basis. Portal or AGOL require a licensed user (i.e., a user that has paid access). The only way esri can validate that a user has payed access is if they are assigned a named user account. If you just used the API key, how could esri track how many users are accessing the services for which they charge. For offline uses you can have a license key for the application, but if you are online and want a resource, the user accessing that service needs to be validated
... View more
02-22-2021
09:42 AM
|
0
|
0
|
3298
|
|
POST
|
We use the rest API directly for server side applications that don't require a UI
... View more
02-02-2021
02:43 PM
|
0
|
0
|
2469
|
|
POST
|
I don't know that you could access the last portal used by ArcGIS Pro. And even if you could this would be dependent on someone having logged in recently enough that the token has not expired. Nor sure why you don't want to encrypt a password. Seems on an internal application that would be secure enough. Not sure what other ways ArcGIS Enterprise is used within your organization, but IWA is an option if your users only access through a Windows domain. Using IWA would be my suggested approach if that could work within your organization Just an FYI: While I am certainly not going to tell anyone and I may be wrong, but my understanding is that Runtime is not licensed to run internally on a server.
... View more
02-01-2021
09:29 AM
|
0
|
2
|
2490
|
|
POST
|
Ah wonderful Job error 500, the mystery issue that could be anything. Like mentioned above checking server logs could give more information. I would do a job.ToJson() to get the communication between the server and client. This will let you know what specific layer is failing. Search for warnings, because for some reason layers failing to sync is not logged as an error. Once you know the layer you can take a look at the actual replica itself. These can be opened in Pro. We have seen sync errors occur if you have corrupted data in the replica. This doesn't seem to cause problems in the Runtime app but cause a sync failure. Geometry and DateTime fields tend to be the culprit from my experience. Good luck
... View more
01-28-2021
08:05 AM
|
0
|
0
|
1329
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-23-2025 12:16 PM | |
| 1 | 10-19-2022 01:08 PM | |
| 1 | 09-03-2025 09:25 AM | |
| 1 | 04-16-2025 12:37 PM | |
| 1 | 03-18-2025 12:17 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-04-2025
04:12 PM
|