POST
|
I think I found the problem. In the current version of the runtime the index of the last point in an ImmutablePart is calculated based on the number of segments instead of the number of points. In the decompiled ImmutablePart, the getEndPoint method looks like this public Point getEndPoint() { if(this.mEndPoint == null && !this.isEmpty()) { this.mEndPoint = Point.createFromInternal(this.mCoreImmutablePart.b((long)(this.size() - 1))); } return this.mEndPoint; } Instead of “this.size() - 1”, I guess it should be “this.getPointCount() - 1”
... View more
02-16-2017
05:17 AM
|
0
|
2
|
399
|
POST
|
Hi, The last point when iterating over the points in an ImmutablePart is not the point returned in getEndPoint() on that same ImmutablePart. See my example below. Why is that? I'm on ArcGIS Runtime for Android 100.0.0. private void partTest(ImmutablePart part) { for (int i = 0; i < part.getPointCount(); i++) { Point p = part.getPoint(i); System.out.println(i + " - " + p.getX() + ", " + p.getY()); } Point startPoint = part.getStartPoint(); System.out.println("Start point - " + startPoint.getX() + ", " + startPoint.getY()); Point endPoint = part.getEndPoint(); System.out.println("End point - " + endPoint.getX() + ", " + endPoint.getY()); } Printouts when running the above with a ImmutablePart over Stockholm: I/System.out: 0 - 2000955.7131845958, 8217577.284820005 I/System.out: 1 - 1989299.2266646507, 8248738.619869451 I/System.out: 2 - 2011153.6917361675, 8252952.245694454 I/System.out: Start point - 2000955.7131845958, 8217577.284820005 I/System.out: End point - 1989299.2266646507, 8248738.619869451 Regards Henrik
... View more
02-16-2017
04:10 AM
|
0
|
3
|
776
|
POST
|
Hi Alexander, Yes I have but unfortunately it doesn't make a difference. And it shouldn't, according to the docs. If the cache has already loaded when the listener is added the DoneLoadingListener method (run) should be called immediately. Since the loading failed randomly I'm leaning towards it being a timing issue of some kind. What I did as a workaround was to create a separate class that repeatedly attempts to load the cache in the background until succeeding. Regards Henrik
... View more
02-14-2017
03:07 AM
|
0
|
0
|
209
|
POST
|
I guess I am a bit late to the party here but I just had the same issue on ArcGIS Runtime SDK for Android 100.0.0 and thought I’d share my solution. In my case the problem was having 64 bit native library dependencies alongside the ArcGIS Runtime SDK native library which I believe only has 32 bit support. Mixing 32 bit only libs with 64 bit libraries causes issues like these since Android cannot load mixed native libs. Filtering out 64 bit ABI's should solve the issue. In build.gradle, defaultConfig: ndk { // Filtering out arm64-v8a, x86_64 and mips64 abiFilters "armeabi", "armeabi-v7a", "x86", "mips" }
... View more
02-08-2017
05:57 AM
|
1
|
0
|
357
|
POST
|
Hi, In my app using ArcGIS Runtime SDK for Android 100.0.0 I’m loading a local TileCache from a TPK file into my MapView as a basemap. Before loading the TileCache I’m adding a “DoneLoadingListener” (Runnable) and a LoadStatusChangedListener to the TileCache to get notified when the loading is done. It is my understanding that these listeners should be called whether the loading succeeds or not and that by checking the LoadStatus on the TileCache I can tell if it loaded successfully or not. On some occasions though, seemingly randomly, the callbacks aren’t called at all. What may cause the callbacks to not be called and how can I monitor what is going on if I can’t get notified using the listeners? Here is the code File baseMap = getPermanentPathForMapType(MapDataType.BASE_MAP); TileCache tileCache = new TileCache(baseMap.getPath()); tileCache.loadAsync(); tileCache.addDoneLoadingListener(new Runnable() { @Override public void run() { Log.i(TAG, "LOAD DONE"); // Sometimes not called } }); tileCache.addLoadStatusChangedListener(new LoadStatusChangedListener() { @Override public void loadStatusChanged(LoadStatusChangedEvent loadStatusChangedEvent) { Log.i(TAG, "LOAD STATUS CHANGED TO " + loadStatusChangedEvent.getNewLoadStatus().toString()); // Sometimes not called } }); Log.i(TAG, tileCache.getLoadStatus().toString()); // LOADING Regards, Henrik
... View more
02-03-2017
10:25 AM
|
0
|
2
|
713
|
POST
|
Hi Shelly, Thank you for your response! Yes, mock locations from the emulator get through to the location display but the course and velocity are not set on the received Location objects. In the iOS 10.2.5 runtime SDK, a location data source was included to provide mock locations from GPX files that did include this information and I would hope this will be included for Android in the future. For now I ended up writing my own location data source that sets velocity and course based on the previous and current locations. Regards Henrik
... View more
01-27-2017
12:37 PM
|
0
|
0
|
346
|
POST
|
Hi, I'm porting an iOS app using ArcGIS Runtime 10.2.5 to Android, using the 100.0.0 runtime version. The app relies on the navigation auto pan mode to have the location display always point up and the underlying map rotate so that the direction of travel is displayed. During the development of the iOS version of the app I could set a GPXDataSource to the location display to simulate movement. With every new location the location display was moved and the map rotated. With the new Android runtime there is no GPXDataSource (the only known subclass to LocationDataSource is the default AndroidLocationDataSource) and loading emulated movement in the form of a GPX file into the emulator gives no course or velocity in the LocationChangedEvents Location object. How can I get the navigation auto pan mode behaviour in the emulator? Do I need to build my own LocationDataSource?
... View more
01-25-2017
06:04 AM
|
0
|
2
|
1219
|
Title | Kudos | Posted |
---|---|---|
1 | 02-08-2017 05:57 AM |
Online Status |
Offline
|
Date Last Visited |
12-02-2020
03:56 AM
|