Native maps Hybrid mode not working on android

29 views
Skip to first unread message

nick.m...@gmail.com

unread,
Jun 16, 2014, 6:11:43 PM6/16/14
to codenameone...@googlegroups.com
Hello,

I'm trying to get the hybrid map mode to work for a project that uses the native map cn1lib.
It seems to work fine on iOS but on my Android device it shows the normal map only.

I have this line when the map component is added to the form:

map.setMapType(MapContainer.MAP_TYPE_HYBRID);


I had a look at the native code and everything looks like it's as it should be, in the setMapType method the switch is calling:
mapInstance.setMapType(GoogleMap.MAP_TYPE_HYBRID);

which should be setting it correctly, but it's just not working for me.

I also extended the native map lib to include MAP_TYPE_SATELLITE but that came up with a completly blank map.
Is there some permission I'm missing in my app or the google api?

Regards,
Nick M

IDE: NetBeans
Desktop OS Windows
Device: Android (LG Nexus 4/ Samsung Galaxy Nexus)

Shai Almog

unread,
Jun 17, 2014, 1:31:58 AM6/17/14
to codenameone...@googlegroups.com, nick.m...@gmail.com
Hi,
I see a problem there. I think its missing from our test case so I didn't test it.

I committed a fix of the source code. Does this work for iOS?

nick.m...@gmail.com

unread,
Jun 17, 2014, 8:29:55 PM6/17/14
to codenameone...@googlegroups.com, nick.m...@gmail.com

Yeah that seems to be working on both platforms, thank you.

Just a note: looks like you've updated the code in svn but not the cn1lib file itself (unless the date is wrong in svn).

As a completely unrelated tangent: I've noticed since the last couple of updates to CN1 that clearing the cache on the simulator is no longer working. Looks like it's making a folder in the user folder called ..cn1 (where it used to be .cn1 with only one dot), and the simulator is not deleting this new folder.

Shai Almog

unread,
Jun 18, 2014, 1:29:25 AM6/18/14
to codenameone...@googlegroups.com, nick.m...@gmail.com
Yes, I was waiting for confirmation from you to update the lib.

I'll have a look at that. Thanks.
Reply all
Reply to author
Forward
0 new messages