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 !