Best way to implement Google maps (and Places library) in Ionic

@loyx, have you tested it?

do you test it on andoird 4.4.4 or android 5.0 ?

Sorry guys, it looks like the patch that the xwalk devs prepared for fixing the compatibility issues with google maps plugin is not working (yet). See this github issue. Weā€™re trying to hunt down the bug, so any help is valuableā€¦

Thanks @mhartington for the angular-google-maps lib link, itā€™s working great!

to answerā€™s @Jimenaā€™s second question about Google Places, this angular lib makes it pretty simple.

Iā€™ve built a demo app to show how to use:

  1. ngCordova GeoLocation plugin to locate user device
  2. use Angular Google Maps to show map of user location
  3. user Angular Google Places to search for nearby places
3 Likes

Any updates on this issue?

Are you using the JS API? From what Iā€™ve read you appear to be using the Android/iOS APIā€™s.

It has been solved alreadyā€¦

2 Likes

@sakotturi Demo is running on ios?

Run with ā€œionic serve --labā€ shows ā€œlog map object to consoleā€ without the map above the button.

Thanks

@dblanco most ngCordova plugins donā€™t work in the browser or emulators (maybe thatā€™s whatā€™s going on here), they need to be installed on an actual device. I know this does work on iOS devices but Iā€™ll look more into this, I havenā€™t been able to work on this recently but Iā€™ll update it with some better debugging so we can see if its not working because the plugins arenā€™t working quite right.

If you want to create an issue on github that would be great, maybe some of the other people whoā€™ve used the demo have come across (and maybe even solved!) this same issue.

Thanks,
Sante


I use this one

How do you use cross walk with a project that is already created?

Hi sakotturi
Iā€™m implemented your demo(SAKOTTURI APP). but for some reason it doesnā€™t show in real android device, Couldnā€™t get working ā€œAngular Google Mapsā€ and ā€œAngular Google placesā€ in real android device.
I havenā€™t been add cordova plugin ā€œgelocationā€, ā€œwhite listā€. But Itā€™s not working. So, how do use cross work with your application.

  • Information of my device: Nexus 5, Android 5.1.1
    Iā€™d appreciate any help.
    Thanks you very much!
    quyennv

hey @quyennvse02884, it sounds like this github issue post might help: https://github.com/skotturi/places-demo/issues/1

once youre removed the android platform from your project and re-added and if youā€™re still having the issue, please open an issue on github and Iā€™ll see if I can help you work through it.

Thanks,
Sante

hi @sakotturi
thanks for your advance. I created an open issue: https://github.com/skotturi/places-demo/issues/2
Please help me check this issue.

Thanks,
quyennv

hello @sakotturi,

is your solution, as today, still the most efficient one for getting Places ?
I mean, there is the cordova plugin https://github.com/mapsplugin/cordova-plugin-googlemaps, but itā€™s quite too heavy for only getting the places.

R.

hi @ronycohen,

I honestly cannot speak to the best solution these days, itā€™s been many months since I dabbled in the Google Maps + Google Places APIs. I think the official cordova plugin wasnā€™t the suggested route but as @mhartington suggested up above, the angular wrapper of gMaps was the better way to go (7 month ago).

http://angular-ui.github.io/angular-google-maps/#!/

-sante

Someone implement get the route from the current position to mark in the map with http://angular-ui.github.io/angular-google-maps/#!/ ?

Thanks !