distriqt / airnativeextensions

DEPRECATED: Original repository of the distriqt native extensions and is no longer maintained. Please see our site for the latest ANEs
https://airnativeextensions.com
2 stars 0 forks source link

ANE-NativeMaps not working correctly on ios 8.0 using starling and feathers #320

Closed cjpendola closed 9 years ago

cjpendola commented 9 years ago

On the IOS version the ane is creating 2 maps on top of each other and that is causing me that when i want to change my Starling UI to a different screen using Feathers the second map stays on screen and my UI won't do anything and my app stops working.

Here are the console prints for both versions(ios and android) and in here you can see that the "map created" event is being call twice.

Android Console:

NativeMaps Supported: true NativeMaps Version: 2.2.6.Android.2.2 Map Move Complete : Latitude: 0, Longitude: 0 Map created! Map Move Complete : Latitude: 0, Longitude: NaN Map Move Complete : Latitude: -1.9999999551579095, Longitude: -78.99999998509884

IOS Console:

NativeMaps Supported: true NativeMaps Version: 2.2.6.iOS.2.2 Map created! Map created! Map Move Complete : Latitude: 30, Longitude: -40 Map Move Complete : Latitude: -2, Longitude: -79

I am setting the latitude and longitude to a static value on both versions witch are Latitude: -2 and Longitude: -79 so i can get the same result on both versions(and using the setCentre() function to go to this coordinates after the map is created). I am adding 2 pics one is for the result that i am suppose to get after i leave the map screen(witch is working fine on android) and one is for the result that i am getting on IOS(the ios one won't move on from the map screen and i belived that is because a second map was created). (before i leave the map screen i do this: NativeMaps.service.removeEventListener( NativeMapEvent.MAP_CREATED, map_createdHandler ); NativeMaps.service.removeEventListener( NativeMapEvent.MAP_MOVE_COMPLETE, map_moveCompleteHandler ); NativeMaps.service.removeEventListener( NativeMapEvent.MAP_TOUCHED, map_touchedHandler ); NativeMaps.service.removeEventListener( NativeMapEvent.MARKER_DRAG_START, map_markerDragStartHandler ); NativeMaps.service.removeEventListener( NativeMapEvent.MARKER_DRAG_END, map_markerDragEndHandler ); NativeMaps.service.removeEventListener( NativeMapEvent.MARKER_TOUCHED, map_markerTouchedHandler ); NativeMaps.service.removeEventListener( NativeMapEvent.MARKER_INFO_WINDOW_TOUCHED, map_infoWindowTouchedHandler ); NativeMaps.service.removeEventListener( NativeMapEvent.USER_LOCATION_ERROR, map_userLocationErrorHandler ); NativeMaps.service.removeEventListener( NativeMapEvent.USER_LOCATION_UPDATE, map_userLocationUpdateHandler ); NativeMaps.service.removeEventListener( NativeMapBitmapEvent.READY, map_bitmapReadyHandler ); NativeMaps.service.removeEventListener( NativeMapBitmapEvent.FAILED, map_bitmapFailedHandler ); NativeMaps.service.destroyMap(); ) The odd part is that the ios version creates 2 maps right from the start is not like I'm not deleting the listeners at first or something.

the problem is on iOS 8.0, i have test it on a iphone 4s and iphone 5c, both with ios8.0 getting the same issue. i am also using adobe air 16 with the last version of starling and feathers.

marchbold commented 9 years ago

Moved to https://github.com/distriqt/ANE-NativeMaps/issues/2