native mapView problem, need help ...

Hi Guys:

Thanks in advance.

I am adding a native mapview in my project, but it run in to 3 problems:

(build .2393 for iOS device)

  1. some times the app crash and quit to desktop when I deleting the mapview. (on iPhone5)

The chance is about 1 crash out of 100. But this only happens during the first few usage when I restart the app. After few times, it become stable.

  1. Each time I add a new mapview and set center, those error message showed in the xCode organizer’s console

The App works normally, but I am worried that apple may reject the app because of this warning message.

"Sep 15 21:42:39 My name here-iPhone geod[115] \<Warning\>: Can't get bundle identifier for process 53" "Sep 15 21:42:39 My name here-iPhone geod[115] \<Warning\>: Can't get bundle identifier for process 53"

 

 

  1. the Legal button in the bottom left corner is not functional.  (It used to work in my another project when I creating a small mapview with older version of the build, but now it’s not working. ) Apple will reject it if it is not working.

things may be easier if I create a map view and move it to the view when I need it, but the mapview will drain battery because of the GPS. (Even I don’t need to get user’s location, but only display a address)

The function to add map view:

function toLargeMap (event) &nbsp; &nbsp; &nbsp; &nbsp; if myMap2 then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if myMap2.x ~= nil then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myMap2:removeSelf() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mpMap2 = nil &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; &nbsp; &nbsp; myMap2 = native.newMapView( ax, ay+26, 310 , 506 ) &nbsp; &nbsp; &nbsp; &nbsp; if myMap2 then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.view:insert(myMap2) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myMap2.mapType = "normal" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local st2 = infoA[s1trueCG][3]..", "..infoA[s1trueCG][4] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print (st2) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local mapLocationHandler = function( event ) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if event.isError then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; native.showAlert( "Error", event.errorMessage, { "OK" } ) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else myMap2:setCenter( event.latitude, event.longitude, false ) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local markerTitle = infoA[s1trueCG][2] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local options =&nbsp;{&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title = markerTitle,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; subtitle = st2,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --listener = markerListener, } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myMap2:addMarker( event.latitude, event.longitude, options) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myMap2:requestLocation( st2, mapLocationHandler ) &nbsp; &nbsp; &nbsp; &nbsp; end end

The function to remove it:

( myMap2 ~= nil will return false on Mac, but it return true on device, so I use myMap2.x to check if it is nil)

function MapBackBtHandler (event) &nbsp; &nbsp; &nbsp; &nbsp; print ("map zoom out") &nbsp; &nbsp; &nbsp; &nbsp; if myMap2 then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if myMap2.x ~= nil then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myMap2.x = 800 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myMap2:removeSelf() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myMap2 = nil &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; &nbsp; &nbsp; end end

Thank you,