POST
|
Hi, I have found that when loading an mmpk, the MinScale for the map is derived from the most restrictive layer. For example, if I have a map with 3 layers, with MinScales: 1:5,000, 1:24,000, and 1:0 (no scale restrictions), then the map gets a MinScale of 1:5,000. So then the MapView locks the user from zooming out beyond 1:5,000. MinScale indicates how far you can 'zoom out' before the layer disappears, so I would expect that in this case the MinScale of the map should be 0 (no scale restriction), since there is at least one layer visible at all scale ranges. I'm just guessing, but it appears that perhaps the Runtime is perhaps attempting to prevent the user from zooming out to a scale where no layer is visible? But if so, the logic seems to have been inverted. It works as expected for a webmap. Here is an mmpk that can be used to test: https://latitudegeo.maps.arcgis.com/home/item.html?id=9c03b622bff54de9a6fedae8a99df0f0 It contains 3 layers with the minscales mentioned above, 5000, 24000, and 0. The Map comes out with a MinScale of 5000.
... View more
04-09-2021
01:38 PM
|
0
|
2
|
944
|
POST
|
Hi, Our team has developed a snapping tool. It works on FeatureLayers. We find a snappable point using FeatureTable.QueryFeaturesAsync() with QueryParameters. This is run every time the user moves the pointer to find a new snapping point. We have found that for online polygons and polygons, the geometries returned from this method are generalized, so we're not getting the real full geometry back. This is obviously really bad for snapping because it means that the point we're snapping to isn't a real point. We have discovered that if you query a ServiceFeatureTable and pass in QueryFeatureFields.LoadAll as an argument, then we get the real full geometry. This is surprising. Also, if we use MapView.IdentifyLayersAsync instead of QueryFeatutresAsync(), then we are also able to get the full geometry. The problem is that in both cases (ServiceFeatureTable.QueryFeaturesAsync with QueryFeatureFields.LoadAll and MapView.IdentifyLayersAsync), that while it does get the real geometry, it also performs a network request to do so. The entire method call, including the network request, proves sufficiently slow that snapping bogs down heavily and eventually just freezes up. So this isn't a viable solution. So we can have accurate, but slow retrieval of geometries, or we can have have but inaccurate. Is there anyway to have both fast and accurate as is needed for snapping? I also find it surprising that the ArcGIS Runtime would at any point return generalized geometry as a result of calling a Query method.
... View more
02-08-2021
12:25 PM
|
0
|
2
|
887
|
POST
|
Hi Morten, Sorry I should have followed up with you on this earlier. Your original question about whether or not the build server VS versions varied significantly got me thinking that this might indeed be the problem, since our versions did vary significantly. Unfortunately, I've now upgraded the servers, so I can't tell you exactly what they used to be, but it was 2017 on the build server (unknown exact version), and 2019 for development (15.2.x). For the current ios build we're on 8.2.6 (2019), and for Android we're on on 16.2.5 (also 2019). Upgrading these servers did actually address the ios crash, but not Android. And even for ios, while the crash did go away, we still were experiencing map initialization failures, which actually turned out to be caused by some fairly hacky stuff we were doing on startup. Effectively, in order to ascertain 'true' edit/delete/add-feature capabilities, we are basically doing a test add/edit/update and checking to see if the Runtime throws an exception, and then rolling back the edits. Rolling back edits it seems was causing the crash with WMTS, but there was also ocassionally the stack trace below, which seems a lot more related to what we were doing. I still have no idea why rolling back edits would cause the WMTS issue, but it seems to be gone now through a combination of upgrading the build server, and deferring our hack to test editing capabilities. BACKGROUND THREAD 27 - CRASHED ArcGIS-arm64 Esri_runtimecore::Geodatabase::Table::revert_changes(Esri_runtimecore::Geodatabase::Difference_from, boost::optional<Esri_runtimecore::Common::Date_time>) ArcGIS-arm64 std::__1::__function::__func<auto Esri_runtimecore::Mapping::Service_feature_table::undo_local_edits(Esri_runtimecore::Mapping::Task_options const&)::$_36::operator()<Esri_runtimecore::Common::Weak_visitor_ptr<Esri_runtimecore::Mapping::Service_feature_table>, Esri_runtimecore::Mapping::Task_completion_source<void>, Esri_runtimecore::Mapping::Task_options>(Esri_runtimecore::Common::Weak_visitor_ptr<Esri_runtimecore::Mapping::Service_feature_table>&, Esri_runtimecore::Mapping::Task_completion_source<void>&, Esri_runtimecore::Mapping::Task_options&)::'lambda'(), std::__1::allocator<std::__1::allocator>, void ()>::operator()() ArcGIS-arm64 std::__1::__function::__func<Esri_runtimecore::Mapping::Task<void>::Task(std::__1::function<void ()>, Esri_runtimecore::Mapping::Task_options)::$_1, std::__1::allocator<Esri_runtimecore::Mapping::Task<void>::Task(std::__1::function<void ()>, Esri_runtimecore::Mapping::Task_options)::$_1>, boost::any ()>::operator()() ArcGIS-arm64 std::__1::__function::__func<Esri_runtimecore::Mapping::Task_implementation::Task_implementation(std::__1::function<boost::any ()>, Esri_runtimecore::Mapping::Task_options)::$_0, std::__1::allocator<Esri_runtimecore::Mapping::Task_implementation::Task_implementation(std::__1::function<boost::any ()>, Esri_runtimecore::Mapping::Task_options)::$_0>, boost::any ()>::operator()() ArcGIS-arm64 pplx::details::_PPLTaskHandle<boost::any, pplx::task<boost::any>::_InitialTaskHandle<boost::any, Esri_runtimecore::Mapping::Task_implementation::Task_implementation(std::__1::function<boost::any ()>, Esri_runtimecore::Mapping::Task_options)::$_0, pplx::details::_TypeSelectorNoAsync>, pplx::details::_TaskProcHandle>::invoke() const ArcGIS-arm64 pplx::details::_TaskProcHandle::_RunChoreBridge(void*) ArcGIS-arm64 Esri_runtimecore::Common::Core_scheduler::bridge_proc_(void*) ArcGIS-arm64 Esri_runtimecore::Common::Core_scheduler::bridge_proc_(void*) libdispatch.dylib _dispatch_client_callout If you're wondering why we're doing this hack to check edit capabilities, it's because we don't have a good way from the ArcGIS Runtime to check whether or not the user has permissions to update/delete/add. The CanUpdate, CanAdd, CanDelete properties on a FeatureTable don't take licensing and anonymous access into account (see bug ENH-000124520), and LayerInfo OwnershipBasedAccessControl is not populated in all cases (case #02370084 with Esri support). For full reference, here is our code to truly check if the user has for example update permission: If there was a nice little method we could call in the Runtime, that would save us from having to do all this hacky work! public override async Task<bool> UserCanUpdate() { var license = ArcGISRuntimeEnvironment.GetLicense(); if (license.LicenseLevel == LicenseLevel.Lite && Capabilities.SupportsUpdate) { // If we have a Lite-level license, the previous check is not enough to ensure that we are reporting correct values, // we have to assert that anonymous adding and editing are also allowed for this layer (e.g. it must be a publicly shared // layer with editing enabled) if (_supportsAnonymousUpdate == null) { _supportsAnonymousUpdate = Layer.FeatureTable.CanUpdateAnonymously(); } bool supportsAnonymousUpdate = await _supportsAnonymousUpdate; return supportsAnonymousUpdate; } return Capabilities.SupportsUpdate; } internal static async Task<bool> CanUpdateAnonymously(this FeatureTable table) { bool canEdit = false; if (table is ServiceFeatureTable sft && sft.LayerInfo.OwnershipBasedAccessControl != null && sft.LayerInfo.OwnershipBasedAccessControl.AllowOthersToUpdate) { // If the layer has Ownership-Based Access Control (OBAC) configured AND users other than the creator are able to edit the // feature, we can skip manually testing the update operation and instead can rely on this property. canEdit = sft.LayerInfo.OwnershipBasedAccessControl.AllowAnonymousToUpdate; } else { try { // If we are using a Lite level license and the layer does not support OBAC, the best we can do is attempt an "empty" update // and catch the error if it fails. (the CanUpdate() method does not return accurate results in this case). var testFeature = await table.QuerySingleFeatureAsync(); if (testFeature == null) { // If there are no features, we'll have to add a dummy one for testing (which we will remove after). testFeature = table.CreateFeature(); await table.AddFeatureAsync(testFeature); } if (testFeature is ArcGISFeature arcgisFeature && arcgisFeature.LoadStatus != Esri.ArcGISRuntime.LoadStatus.Loaded) { // Need to load the feature before calling the update. await arcgisFeature.LoadAsync(); } // Test update. await table.UpdateFeatureAsync(testFeature); canEdit = true; } catch { // The update failed, so we know for sure that we both cannot update nor delete (since delete is never a // standalone permission). canEdit = false; } finally { // Ensure we clear out any edits we made. try { await table.ClearLocalEditsAsync(); } catch (Exception) { } } } return canEdit; }
... View more
09-30-2019
12:49 PM
|
0
|
1
|
897
|
POST
|
Hi Morten, Sorry I was a little light on details. We've seen it consistently on iOS and Android. The app is an offline data collection app, but the crash is occurring on startup (no editing being done), loading an online web map. The last line our lines indicates that we're about to load the map, and then the app crashes. It's occurring about 30-40% of the time on startup, and it's not occurring on builds out of Visual Studio for some reason (only off our build server) which makes it a little more difficult to troubleshoot. I'm just a little confused why it would doing anything to do with WMTS when we don't have any WMTS layers. I will try to get some better diagnostics and see if I can provide you with more details. Jeff
... View more
09-16-2019
09:06 AM
|
0
|
4
|
897
|
POST
|
We're seeing this crash a lot in our crash reports. It happens immediately on startup of the application, and curiously this app does not even reference any WMTS layers. Is this a known issue? Any way we can troubleshoot it further? Stack traces BACKGROUND THREAD 24 - CRASHED ArcGIS-arm64 RT_WMTSTileMatrixSet_getWellKnownScaleSetId ArcGIS-arm64 RT_WMTSTileMatrixSet_getWellKnownScaleSetId ArcGIS-arm64 RT_WMTSTileMatrixSet_getWellKnownScaleSetId ArcGIS-arm64 RT_WMTSTileMatrixSet_getWellKnownScaleSetId ArcGIS-arm64 RT_WMTSTileMatrixSet_getWellKnownScaleSetId ArcGIS-arm64 RT_WMTSTileMatrixSet_getWellKnownScaleSetId ArcGIS-arm64 RT_WMTSTileMatrixSet_getWellKnownScaleSetId ArcGIS-arm64 RT_WMTSTileMatrixSet_getWellKnownScaleSetId libdispatch.dylib _dispatch_client_callout
... View more
09-12-2019
03:15 PM
|
0
|
6
|
977
|
POST
|
We have had several customers complaining that our app is rendering fewer features than they see in AGOL. Here is a screenshot of both at the same extent and scale. Is there any way we can configure the Runtime SDK to render more features, like the ArcGIS JavaScript API does? It looks like the JS API chunks up the requests into tiles, so that even though you can still hit the 1000 feature limit for a given tile, because it's broken up into tiles, you get more features overall. To our customers, this looks like a bug in our software. Thanks, Jeff
... View more
07-16-2019
01:33 PM
|
0
|
1
|
651
|
POST
|
I don't believe I'm calling any task returning methods without await their result. Below is the code from the view model for a command that is bound to the view using data binding. Note that the code below is 'simplified' so that is sufficiently illustrative of what I'm trying to achieve. There are no warnings in the build about non-awaited tasks. I have verified that exceptions are caught by putting a throw new Exception() inside of the second SubmitEditsAsync(Map map), and the error is caught and handled. It looks like the error is occurring outside of the call stack (on a separate thread) in the ArcGIS Runtime. private async void SubmitEditsAsync(OfflineArea offlineArea)
{
try
{
await SubmitEditsAsync(offlineArea.Map);
}
catch (Exception e)
{
await _dialogHandler.ShowAlertAsync(e);
}
}
private async Task SubmitEditsAsync(Map map)
{
// Create the sync task
var syncTask = await OfflineMapSyncTask.CreateAsync(map);
syncTask.SyncOfflineMap(new OfflineMapSyncParameters() { SyncDirection = SyncDirection.Upload });
// Create the job
var job = syncTask.SyncOfflineMap(new OfflineMapSyncParameters()
{
RollbackOnFailure = true,
SyncDirection = SyncDirection.Upload
});
// Await result
var result = await job.GetResultAsync();
}
... View more
09-11-2018
09:28 AM
|
0
|
0
|
888
|
POST
|
I'm getting an UnobservedTaskException "Unable to synchronize replica" when synchronizing a replica (upload edits). I don't always get the error - only occasionally. I'm using ArcGIS Runtime 100.3 and AGOL hosted feature layers. at Esri.ArcGISRuntime.Http.ArcGISHttpClientHandler.ArcGISClientHandlerInternal.<SendAsync>d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Esri.ArcGISRuntime.Internal.RequestRequiredHandler.<IssueRequestAndRespond>d__14.MoveNext() I'm watching for unobserved task exceptions this way: TaskScheduler.UnobservedTaskException += (sender, args) => { Logger.Warn($"TaskScheduler.UnobservedTaskException:\n{args.Exception.Message}\n{args.Exception.InnerException?.Message}"); #if DEBUG DisplayError($"Unobserved task exception: {args.Exception.Message}\n{args.Exception.InnerException?.Message}"); #endif };
... View more
09-07-2018
10:11 AM
|
0
|
4
|
1153
|
POST
|
Here are the headers for the request that fails (returns http 304): POST /arcgis/rest/services/LA_StreetMap_DesignBase_Unsecured/MapServer/90/query HTTP/1.1 Host: mot-arcgis.latitudegeo.com:6080 Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate Connection: keep-alive If-None-Match: 1402076183 Connection: keep-alive Accept: */* User-Agent: ArcGISRuntime-NET/100.2.1 (iOS 11.4; iPad5,3) Referer: http://arcgis.com/ Content-Length: 4989 Accept-Language: en-ca And here are the headers for a similar request in Windows that works (returns http 200): POST /arcgis/rest/services/LA_StreetMap_DesignBase_Unsecured/MapServer/90/query HTTP/1.1 Referer: http://geocortexmobileviewerskg3azj8gvpd4/ Accept-Encoding: gzip, deflate User-Agent: ArcGISRuntime-NET/100.2.1 (Windows 10.0.16299; x86; UAP; Windows.Desktop) Content-Length: 4982 Content-Type: application/x-www-form-urlencoded Host: mot-arcgis.latitudegeo.com:6080 Connection: Keep-Alive Pragma: no-cache If you'd like, I can also get you a Fiddler trace.
... View more
07-04-2018
08:50 AM
|
0
|
0
|
638
|
POST
|
I'm having some trouble with ServiceFeatureTable.QueryFeaturesAsync(). Basically, it seems to produce very inconsistent results on iOS. Sometimes it returns features, but mostly it doesn't. I've tried on a few different services and layers and get the same behavior. My code looks like this: var queryParams = new QueryParameters() { ReturnGeometry = true, SpatialRelationship = SpatialRelationship.EnvelopeIntersects, Geometry = // a polygon obtained from user in spatial ref wkid 3857 (web mercator) }; var features = await featureTable.QueryFeaturesAsync(queryParams, Esri.ArcGISRuntime.Data.QueryFeatureFields.Minimum, options.CancellationToken); The service is also in 3857. The problem is that no features are returned even though there clearly are features at the given location. I looked at the request using the Charles web proxy (similar to Fiddler, but works on a Mac), and ArcGIS Server is responding with http 304 (not modified). If I repeat the request with caching disabled in Charles, then ArcGIS Server does return results to me. It seems like a bug to me. Is this a known issue? Are there any workarounds or solutions? It works fine on Android and Windows UWP.
... View more
06-20-2018
04:27 PM
|
0
|
3
|
815
|
POST
|
Thank you for letting me know! I look forward to the next version.
... View more
04-13-2018
08:23 AM
|
0
|
0
|
827
|
POST
|
I'm trying to write some unit tests on classes that use the ArcGIS Runtime. I don't want to hit live services. Instead, I want to provide fake responses. Is there any way to provide an instance of HttpClient or HttpMessageHandler to the ArcGIS Runtime so that I can send fake responses back?
... View more
04-09-2018
02:18 PM
|
0
|
2
|
1035
|
POST
|
We have a use case whereby we would like users to be able to download different offline areas, and to be able to view the data from those offline areas all at once. For example, user downloads area A, then area B, then area C. While offline, the user would then be able to pan and zoom around the map, looking at areas A, B, C seamlessly. It appears that this sort of functionality would not be possible to build offline because: A) FeatureLayer and FeatureTable can only source a single geodatabase table. B) FeatureLayer and FeatureTable are not extensible. Is there any way to accomplish this sort of functionality, or are there any plans in the Runtime API to support it? The only way I can think of is to create multiple feature layers, but that means that when querying the feature, we would need to query multiple layers and aggregate the results into one, so as to give the appearance of there being only a single layer.
... View more
09-06-2017
04:43 PM
|
0
|
1
|
392
|
Title | Kudos | Posted |
---|---|---|
1 | 01-28-2016 11:15 AM |
Online Status |
Offline
|
Date Last Visited |
04-09-2021
06:44 PM
|