hi.
usually when i work with maps i call native.newMapView() for simple stuff.
if i want directions i would go for system.url route with http://…will call web version of google map and will show it.
i tried a different approach today with 50% of success.
my code is this:
local url="comgooglemaps:" local function getDirections() if not ( system.canOpenURL(url) ) then system.openURL("http://maps.apple.com/?saddr="..mylat..","..mylng.."&daddr="..lat..","..lng.."&dirflg=r") else system.openURL( url.."//?saddr="..mylat..","..mylng.."&daddr="..lat..","..lng.."&directionsmode=transit" ) end end
on IOS with google maps app installed it will open google maps like it should.
on IOS without google maps will open apple app like it should.
on android it will not detect the google maps app is installed. Even if it is, and will start to open maps from apple on browser…it detects thats a map i’m trying to open…half a second later closes apples map, opens google maps. 0%? of success because it should had open in the first place the app.
so on IOS all works like it should. on android not really. what i’m doing it wrong in android part?
do i need to go “intent” route on android?
regards,
carlos.