native.newMapView() - different behavior on IOS and Android

i’ve an app that have buttons, one of them open a map in full screen, the others do other stuff, not important for my question.

when i hit the button that creates a native.newMapView() in android (full screen) all links hidden behind the map, i can’t touch them, like it should.

if i do the same in IOS, all hidden buttons i’ve behind the map are still active, so i assume maps in android have activated focus=true, and IOS the focus is false since i can touch other buttons i’ve behind the map.

my question is, this is normal behavior or is a bug?

regards,

Carlos.

Hi Carlos,

Can you please include a basic code snippet for how you’re showing your newMapView()?

Thanks,

Brent

hi Brent, sorry for late response, only now i had some time to visit the forum.

my map is pretty much simple like in Corona Docs:

local myMap = native.newMapView( 20, 20, 280, 360 ) myMap.x = display.contentCenterX myMap.y = display.contentCenterY

ive created another variable that holds an button if that button is behind the created map i still can pressed it (only on IOS). i resolved the problem creating an invisible rectangule behind the map that have touch event but dont call anything. still this should not be happening. i dont have time right now to make a simple code to prove my point, i can’t copy paste my code because i use my one functions to create buttons and have lots of references that will make the code useless in here. (my buttons return true, so i know if you have 1 button in front on another only the top one will work)

hope this helps,

regards, Carlos.

Can you put together a simple demo project that shows the problem. The project must have a main.lua, config.lua and build.settings that will let us run the project and see the issue without us having to guess as to what the missing pieces are. This includes any assets needed. Put all of that in a .zip file and use the “Report a bug” link at the top of the page. It’s helpful when filling out the description of the bug to include a reference to this forum thread.

You will get an email confirming the bug. In that email, the subject will contain a caseID number. Please post that back here so we have a reference to it.

Thanks

Rob

today i had some spare time to build a simple test app, and i can confirm this is a bug.

The code i created is:

local \_W=display.contentWidth local \_H=display.contentHeight local myMap = native.newMapView( 30, 30, \_W, \_H-50 ) if myMap then myMap.x = display.contentCenterX myMap.y = display.contentCenterY-25 end local object = display.newRect(0,0,40,40) object.anchorX=0 object.anchorY=0 local counter=0 local params={ text=counter, fontSize=20, align="center", x=\_W\*.5, y=\_H-25 } local showCounter=display.newText(params) local function onObjectTouch( self, event ) if ( event.phase == "began" ) then counter=counter+1 showCounter.text=counter end return true end object.touch = onObjectTouch object:addEventListener( "touch", object )

you can confirm yourself the bug.

when the map is on the device, press the top left area of the screen (where the button was created) and you will see the counter adding up, that proves the touch event behind the map is still working. this only happens on IOS.

I already submited, when i’ve the caseID i will post it here.

46594

thanks rob for posting the bug case number.

Hi Carlos,

Can you please include a basic code snippet for how you’re showing your newMapView()?

Thanks,

Brent

hi Brent, sorry for late response, only now i had some time to visit the forum.

my map is pretty much simple like in Corona Docs:

local myMap = native.newMapView( 20, 20, 280, 360 ) myMap.x = display.contentCenterX myMap.y = display.contentCenterY

ive created another variable that holds an button if that button is behind the created map i still can pressed it (only on IOS). i resolved the problem creating an invisible rectangule behind the map that have touch event but dont call anything. still this should not be happening. i dont have time right now to make a simple code to prove my point, i can’t copy paste my code because i use my one functions to create buttons and have lots of references that will make the code useless in here. (my buttons return true, so i know if you have 1 button in front on another only the top one will work)

hope this helps,

regards, Carlos.

Can you put together a simple demo project that shows the problem. The project must have a main.lua, config.lua and build.settings that will let us run the project and see the issue without us having to guess as to what the missing pieces are. This includes any assets needed. Put all of that in a .zip file and use the “Report a bug” link at the top of the page. It’s helpful when filling out the description of the bug to include a reference to this forum thread.

You will get an email confirming the bug. In that email, the subject will contain a caseID number. Please post that back here so we have a reference to it.

Thanks

Rob

today i had some spare time to build a simple test app, and i can confirm this is a bug.

The code i created is:

local \_W=display.contentWidth local \_H=display.contentHeight local myMap = native.newMapView( 30, 30, \_W, \_H-50 ) if myMap then myMap.x = display.contentCenterX myMap.y = display.contentCenterY-25 end local object = display.newRect(0,0,40,40) object.anchorX=0 object.anchorY=0 local counter=0 local params={ text=counter, fontSize=20, align="center", x=\_W\*.5, y=\_H-25 } local showCounter=display.newText(params) local function onObjectTouch( self, event ) if ( event.phase == "began" ) then counter=counter+1 showCounter.text=counter end return true end object.touch = onObjectTouch object:addEventListener( "touch", object )

you can confirm yourself the bug.

when the map is on the device, press the top left area of the screen (where the button was created) and you will see the counter adding up, that proves the touch event behind the map is still working. this only happens on IOS.

I already submited, when i’ve the caseID i will post it here.

46594

thanks rob for posting the bug case number.