I have converted my app from Google Maps to Amazon Maps v2 so it can run on the Kindle Fire and give the user the same experience. My app shows satellite orbits across the globe. Now I have encountered some problems. These issues do not occur when using Google Maps.
1. Polylines and Polygons are cut off when they cross the dateline. Depending on where the poly is on the screen (moving it from one side to the other), the polygon might be drawn or not.
2. Amazon Maps can crash when the device is rotated. I'm using a mapfragment in a fragment. When the device is rotated the fragments are recreated. This goes well most of the time. But when the device is rotated fast a couple of times, there is a crash in maps. I've locked the rotation when the map is being prepared using this method:
http://stackoverflow.com/a/18982674 I have put try/catch almost everywhere. I still can not catch this Exception. Stack trace: java.lang.IllegalArgumentException: Context 0 was not a valid map context identifier. at com.amazon.geo.client.dynobj.DynamicObjectContext.ensureNativePeerType(Native Method) at com.amazon.geo.client.dynobj.DynamicObjectContext.defineDynamicObjectClass(DynamicObjectContext.java:259) at com.amazon.geo.client.renderer.interactivity.overlays.OverlayLayer.addOverlayInternal(OverlayLayer.java:111) at com.amazon.geo.client.renderer.interactivity.overlays.OverlayLayer.access$000(OverlayLayer.java:42) at com.amazon.geo.client.renderer.interactivity.overlays.OverlayLayer$1.handleMessage(OverlayLayer.java:70) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5266) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:826) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:642) at dalvik.system.NativeStart.main(Native Method)
Hi there, Apologies that you have been experience this issue. Would you be able to post adb logs from your app, especially during these issues, so that this problem can be investigated further? It would be greatly appreciated! Regards, Jamie
The crashes do not happen always. OnAnimateMapToLocation.txt contains a crash that sometimes happens when the view is animated towards a location of a satellite. The location of the satellite is updated every two seconds. The animation is also called every two seconds. Maybe this is the cause of the crash? OnQuickRotate.txt contains a crash that occurs when the device (Amazon Kindle Fire 6") is rotated fast a couple of times. Here are the two crash logs:
Hi there, Thanks for providing those logs. We have filled a bug report for the orientation issue which we will investigate further. Also, it seems that the dateline issue is actually a known problem, and we have multiple bugs filled for it. Both of these bugs are scheduled to be fixed in our next release. Hope this helps! Jamie