Remove a Google Maps in Scene

Hello!

I would like to know how to remove google maps from a storyboard scene …

I do so:

[lua]if map then
map:removeSelf()
map = nil
end[/lua]

The map disappears but does not change the scene …

If you remove the map definitely, this is not the case and now the scene changes …

Can someone tell me why?

It is urgent …

Thank you,

Tiago Eirinha

I’ve been studying the case, and my map is not inserted in any group …

I read that the “native” can not be inserted into groups …

The problem continues …

Thank you

Correct.  “native” objects are not insertable into groups.  Therefore it can’t be put into and managed by a storyboard scene.   You probably should be creating the map in the “enterScene” function and then disposing of it in the “exitScene” function since those will always be in pairs.

Hello!

No…

I have a button that has an associated listener and creates the map when it is pressed …

Then in exitScene remove the map, as I said earlier …

The listener is out of the functions of the storyboard …

Thank you

Are you getting any messages in your console log from the device?
 

I’ve been studying the case, and my map is not inserted in any group …

I read that the “native” can not be inserted into groups …

The problem continues …

Thank you

Correct.  “native” objects are not insertable into groups.  Therefore it can’t be put into and managed by a storyboard scene.   You probably should be creating the map in the “enterScene” function and then disposing of it in the “exitScene” function since those will always be in pairs.

Hello!

No…

I have a button that has an associated listener and creates the map when it is pressed …

Then in exitScene remove the map, as I said earlier …

The listener is out of the functions of the storyboard …

Thank you

Are you getting any messages in your console log from the device?
 

Just add to your next screen on the function enterscene storyboard.removeAll()

Just add to your next screen on the function enterscene storyboard.removeAll()