mapsplugin / cordova-plugin-googlemaps

Google Maps plugin for Cordova
Apache License 2.0
1.66k stars 918 forks source link

Any documentation on how to use with Ionic 5? #2814

Closed liquidcms closed 4 years ago

liquidcms commented 4 years ago

Does anyone know if there is any documentation/example of how to use this with Ionic (5)?

Also, it sounds like support for iOS is ongoing/completed? What is the status?

Will gladly buy you a whole case of beer. :)

wf9a5m75 commented 4 years ago

Usage of ionic 4 and 5 are the same.

Here is the slide. https://docs.google.com/presentation/d/e/2PACX-1vScoho1ensbR4qCI9AIuQN55BZVvK73pAjI7sumDvW3CrxxHnrmpXWUjx2-8CpFibqU1EjLKCRhuthJ/pub?start=false&loop=false&delayms=3000&slide=id.p

The Capacitor iOS projector is so far so good.

liquidcms commented 4 years ago

Thanks Masashi, slides look great.. a few mistakes in them though:

I have super simple map working now. Thank you for the slides. Need to go through rest of slides and add markers, route lines, geolocation, etc and i am not real sure how the idea of offline operation works; but need to figure that out as well.

Shouldn't these slides be linked off the project page? Or in the documentation? Would also be great to have a text version so people could copy/paste. Just a thought.

Where do i send the beer? Sapporo?

wf9a5m75 commented 4 years ago

Congratulations for the first simple map. I haven't updated the slide recently. The slide was created two years ago, so please ignore small differences.


Screen Shot 2020-07-24 at 8 59 20 AM

https://docs.google.com/presentation/d/e/2PACX-1vScoho1ensbR4qCI9AIuQN55BZVvK73pAjI7sumDvW3CrxxHnrmpXWUjx2-8CpFibqU1EjLKCRhuthJ/pub?start=false&loop=false&delayms=3000&slide=id.g411a80c569_0_149

Since this plugin does not use Google Maps JavaScript v3 on Android/iOS platforms, you should not use <script> tag if you don't use additional libraries (such as places Because index.html is not obfuscated.

API key is able to restricted based on domain(web), signature file(Android), and app bundle id(iOS). But cordova runs a browser as web however mobile app does not have domain inside app, there is no way to set security to the api key. That's why if someone inspect your app using developer tools, your api key is discovered, and reuse it, but fee charge comes to you.

That's why I recommend writing API key inside the code using Environment class.


Complete demo of ionic 4/5 is here https://github.com/mapsplugin/ionic-googlemaps-quickdemo-v4

And demo of ionic 6 is here https://github.com/mapsplugin/ionic-googlemaps-quickdemo-v5


Shouldn't these slides be linked off the project page?

Those documents are linked from @ionic-team/ionic-native-google-maps repository.

Since this plugin is not only for ionic, but also supports other JS frameworks, such as framework 7 , or without any framework. (Some people use this plugin in Drupal PhoneGap)

That's why linked from the @ionic-native/google-maps repo.


This plugin covers most of features of Google Maps JavaScript API v3, but some features are not covered yet, such as Direction (search route).

I'm working on it, but I don't have enough time to complete those tasks. I've been focusing on the Capacitor iOS project now.


I live in the US. Well, sending beer is appreciate but donation is easy for you.

https://github.com/mapsplugin/cordova-plugin-googlemaps#please-support-this-plugin-activity

liquidcms commented 4 years ago

Ah, yes, I see now.. didn't look too close at the Env setup.

liquidcms commented 4 years ago

Went well on browser, got map running with custom markers. Very nice. But, when installed on my Android device; going to the map just crashes the app. I'll post a bug report but looks like i may need to buy a new phone to be able to debug this properly. :(