POST
|
I'm attempting to read JSON from a configuration file using file.readAll(). I can open and perform the read, but can't figure out how to convert the ArrayBuffer to a string or ultimately I want to make use of the JSON in the file. Considering the file "foo.json" in my data folder: {
"name": "value",
"things": []
} I'm reading it using the following code: function readConfig() {
var file = AppFramework.file(AppFramework.userHomePath + "/ArcGIS/Runtime/Data/foo.json");
if (file.exists) {
if (file.open(File.OpenModeReadOnly)) {
var data = file.readAll();
// get the json?
file.close();
}
}
} but I can't seem to get the text or JSON from the binary data that readAll() returns. It looks like I could use a loop and readLine() which returns a string, then check for file.atEnd, but it seems like there must be a better way. Obviously I'm new on the QML/JS journey and would sure appreciate a push in the right direction. Thanks in advance!
... View more
06-11-2020
07:22 AM
|
0
|
3
|
757
|
POST
|
Hi, I'm programmatically adding a bunch of feature layers to a map from a local, runtime geodatabase. Prior to adding to the map, I would like to get the geometry type of the feature table (or feature layer). Can someone assist me with the most efficient way to get that info? I'm pretty new to QML. Thanks in advance! Mike
... View more
06-02-2020
02:39 PM
|
0
|
1
|
528
|
POST
|
Oh gawd. I found the problem.... my extent is off. I'm gonna leave this here instead of deleting it. I deserve the shame.
... View more
05-06-2020
09:28 AM
|
0
|
0
|
155
|
POST
|
Hi, I've got a vector tile package that I'm trying to load into a MapView. The map control is definitely added to the page (building off Tuesday's lab), but I can't get the .vtpk to draw. Seems like something silly that I'm missing. I'm sure the vector tile package is valid (draws fine in pro, I've published it as a hosted service) and the initial viewpoint should be just within the data area. Appreciate any pointers. Here is the code snipped I'm working with: MapView {
id: mapView
anchors.fill: parent
Map {
id: map
Basemap {
ArcGISVectorTiledLayer {
id: vectorbasemap
url: AppFramework.userHomePath + "/ArcGIS/Runtime/Data/Basemap_Color_Complete_Vector.vtpk"
}
}
initialViewpoint: ViewpointCenter {
id: initialViewpoint
center: Point {
x: 13647642.0
y: 5703059.0
spatialReference: SpatialReference {wkid: 3857}
}
targetScale: 72224.0
}
}
} which results in this: The data location should be fine, I think: This is what the same tile package looks like in pro: Thanks for the workshop, it's been great and helping to give me the push I needed. AppStudio, AppStudio Player and Qt/QML are (for some reason) more attractive to me than Xamarin... and that's coming from a .NET developer.
... View more
05-06-2020
09:24 AM
|
0
|
1
|
716
|
POST
|
Thanks for the feedback and the pointer to another code sample. I was able to adopt some of those ideas and improve the user experience when access problems are encountered within a web map. The default behavior of the AuthenticationHandler retrying over and over for each item encountered in the web map isn't very helpful and tends to make people think they are stuck in a loop.
... View more
04-22-2020
06:41 AM
|
0
|
1
|
943
|
POST
|
Anyone from esri want to take a run at answering this? Thanks in advance!
... View more
04-20-2020
09:20 AM
|
0
|
0
|
943
|
POST
|
Hi, I'm looking for feedback on some specific behavior with AuthenticationManager and the example implementation of OAuthAuthorizeHandler using the OAuthImplicit type. The implementation of my OAuthAuthorizeHandler is based almost entirely on this esri sample on github. Behavior I'm seeing: I have a webmap stored in ArcGIS enterprise, which is shared with the organization. The web map contains layers that are shared to the organization and a single feature layer that is private and not shared with any group or user. This private layer is intentional, so that I can understand the behavior of a user not having permissions to a layer. When a user opens the web map in the app, they are initially challenged (they can click-thru as our portal is federated with ADFS). The web map loads as expected. The private feature layer that is not shared then causes another challenge. Clicking through this causes another challenge and then another. Looping 6 or 7 times, then an OperationCanceledException is raised. Basically the same effect as if the user cancels the challenge. This challenge/loop behavior will repeat for every layer in the web map that a user lacks permissions for. My questions: 1) Am I understanding this behavior correctly? The AuthenticationManager will attempt to authenticate 6 or 7 times then cancel? 2) If so, are there any mechanisms available for influencing this behavior? For example, indicating how many retries are allowed before canceling? Thanks in advance for answering the specific questions above. Mike
... View more
04-14-2020
12:48 PM
|
0
|
4
|
1022
|
POST
|
Esri's documentation indicates that an implementation of OAuthAuthorizeHandler is available in the toolkit (below). I'm having trouble locating it. Has it been removed or am I being stupid? Also, is there a canonical example of how to implement such an object? I'm particularly interested in any nuances around handling token timeouts. A number of the online samples show slightly different implementations. For example these two help topic show some differences in the implementation: ServerInfo Class and IOAuthAuthorizeHandler Interface public Esri.ArcGISRuntime.Security.IOAuthAuthorizeHandler OAuthAuthorizeHandler { get; set; } Member of Esri.ArcGISRuntime.Security.AuthenticationManager Summary: Gets or sets the component sets the component that handles authorization by a resource owner in an oauth workflow. Remarks: The ArcGISRuntime SDK doesn't provide any default OAuthAuthorizeHandler implementation but the ArcGIS Runtime Toolkit for .NET provides such a component. This toolkit component can be set by code like: AuthenticationManager.Current.OAuthAuthorizeHandler = new Esri.ArcGISRuntime.Toolkit.Security.OAuthAuthorizeHandler();
... View more
02-03-2020
09:47 AM
|
0
|
1
|
531
|
POST
|
Runtime does support paging the result of queries. Works fine if you are doing a query and want to draw or do something with the results. If the feature layer in question is simply a layer in a webmap that you are loading, it won't help you. More info here: https://community.esri.com/thread/228285-queryfeaturesasync-paging
... View more
07-24-2019
10:42 AM
|
0
|
0
|
588
|
POST
|
It seems to be fixed in my use cases which were: query via geometries with very high vertex counts as well as where clauses such as [field] IN (1,2,3,....1000,1001)
... View more
05-07-2019
12:58 PM
|
0
|
0
|
1136
|
POST
|
Michael Branscomb We talked at the recent dev summit and I was inquiring if this issue was fixed in the upcoming release. The scope of this issue was that a query parameter object is provisioned with either a very complex geometry or a where clause that is very long such as an IN statement with many values. Each scenario could cause the error reported here. Thanks for the update.
... View more
03-12-2019
10:43 AM
|
0
|
3
|
1136
|
POST
|
Thanks Jennifer Nery, that looks exactly like what I needed. Much appreciated!
... View more
02-05-2019
01:24 PM
|
0
|
0
|
992
|
POST
|
I've got a map service that supports paging and has MaxFeatureCount set to 4000. Can someone familiar with using runtime's paging capability on QueryFeaturesAsync() give me some pointers on how I can return more than 4000 features? I'm seeing properties on the QueryParameters object such as MaxFeatures, MaxAllowableOffset and ResultOffset but the docs don't really indicate how these should be utilized. Do I need to execute my query in a Do While loop? If so does that mean I need to first do a QueryFeatureCountAsync() to set up the paging logic? Thanks in advance!
... View more
02-04-2019
09:28 AM
|
0
|
2
|
1187
|
POST
|
I've also opened a tech support case: Esri Case #02231288 for this issue.
... View more
12-10-2018
08:32 AM
|
0
|
0
|
1136
|
POST
|
[EDIT2] Esri tech support has logged BUG-000118762 in reference to this issue [EDIT] Visual studio project added, which demonstrates issue This behavior is with .NET Runtime 100.4 When querying a service feature table using a complex geometry, the QueryFeatureAsync() method throws an error (shared below) which indicates that the Uri is too long. I can regularly run simpler geometries through this code, so my assumption is that there is a problem with the volume of information being handled when this method URL encodes and/or attempts to post to the server. The query parameters sent into the query is straightforward, consisting of the geometry and a spatial relationship of intersects. As I mentioned, the geometry is a complex one. Something like a 244 part polygon consisting of about 24,500 points. I've attached the JSON for this polygon below as buffers.json. You can point the query with that geometry at this endpoint: Layer: Taxlots (ID: 😎 As an aside, this issue sounds alot like a post on stack overflow related to System.Net.Http.HttpClient. I don't see anything actionable in there since the exception is being thrown out of an Esri method. Here is the error: HResult: -2146233033
Message: "Invalid URI: The Uri string is too long."
Source: "Esri.ArcGISRuntime"
StackTrace:
at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
at RuntimeCoreNet.GeneratedWrappers.CoreTask.Get()
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions.TaskCompletedCallbackHandler`1.OnCompleted(Object sender, EventArgs e)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions.TaskCompletedCallbackHandler`1.<CreateInternal>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Data.ServiceFeatureTable.<QueryFeaturesInternal>d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at MapWorks.LayerSelection.SelectableItem.<ExecuteQuery>d__35.MoveNext() in C:\GitHub\MapWorks\MapWorks\LayerSelection.xaml.cs:line 1285 Thanks for your assitance!
... View more
12-06-2018
10:31 AM
|
1
|
6
|
1690
|
Title | Kudos | Posted |
---|---|---|
2 | 01-31-2024 09:15 AM | |
2 | 01-09-2024 01:48 PM | |
1 | 09-29-2023 06:41 AM | |
16 | 09-21-2023 07:16 AM | |
1 | 09-07-2023 07:20 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|