Announcing the Capacitor Google Maps Plugin

Originally published at: Announcing the Capacitor Google Maps Plugin - Ionic Blog

Today we’re excited to announce a new, open-source Capacitor plugin: @capacitor/google-maps. With @capacitor/google-maps, you can embed a native Google maps experience directly into your Capacitor app. Let’s go over how you can add a map to your app. Adding the @capacitor/google-maps package to your project You can add the Capacitor Google Maps plugin to your…

9 Likes

This is Amazing :tada::raised_hands:t3: Thank you

Love it, thank you! :star_struck::star_struck:

This is sweet,…thanks… not yet on the capacitor page though.

Awesome! I already have a great solution working but…

  1. Does this have support for custom markers? (svg, pictures, etc)
  2. Does this support getting into the google.map object?
  3. Offline support?
  4. Paths?
1 Like

Amazing news! Great work, team!

What wonderful thing! It’s all I need to finish a project <3

Does this work offline as well?

it’s here

hey guys, thanks for this plugin! Im already giving a try and works like a charm on the web, however when running on android it throws some errors for which i couldnt find any solution so far… any ideas?

2022-05-02 14:57:00.478 14691-14902/our_package_name W/SnapshotHandler: Unable to retrieve flag snapshot for com.google.android.libraries.consentverifier#our_package_name, using defaults.
java.io.FileNotFoundException: /data/user/0/our_package_name/files/phenotype/shared/com.google.android.libraries.consentverifier#our_package_name.pb (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:231)
at java.io.FileInputStream.(FileInputStream.java:165)
at zg.d(:com.google.android.gms.dynamite_mapsdynamite@221215067@22.12.15 (100408-0):2)

2022-05-02 14:57:00.495 14691-14903/our_package_name W/MobStoreFlagStore: Unable to update local snapshot for com.google.android.libraries.consentverifier#our_package_name, may result in stale flags.
java.util.concurrent.ExecutionException: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=our_package_name, sha256=[…], atk=false, ver=221215030.true (go/gsrlt)
at agz.s(:com.google.android.gms.dynamite_mapsdynamite@221215067@22.12.15 (100408-0):3)

I’ve given this a try and it works great! I was wondering if there is way to implement Polygon drawing on the map with this plugin?

1 Like

I also just found that the marker dragging doesn’t work on Android.

@mhartington New announcement and four outstanding questions in the comments. Y’all need to do better about this… probably my number one complaint about Ionic is lack of forum replies. This is brand new and nobody fielding the questions.

1 Like

Reviewing the questions, but just an FYI…

We published the post on a Friday, it was the weekend, and came back to work on Monday. While I’m sure everyone would love for use to be able to answer question 24/7, everyone on the team also have other responsibilities.

1 Like

@mhartington Fair enough. This is why no company I’ve ever worked for releases code to production on a Friday either. Maybe no blog posts right before the weekend if you know it’ll be a few days before questions/technical issues can’t be addressed? Just a thought.

At the moment, most of these are "No"s for the moment. For offline support, if the native SDK supports it, I would assume it’s possible.

Keep in mind, this is only a 1.0 release of the plugin, and while these features are not implemented at the moment, it does not mean they won’t be. 1.0 just means we have the initial planned features implemented.

1 Like

What about Google Maps Polygon feature? https://developers.google.com/maps/documentation/javascript/examples/polygon-simple
@mhartington

Sounds good. I have an app now that uses Google Maps and all of the features I asked about above. Maybe I can contribute to that repo some of the features I already have since they’re all standard Google Maps API things (like markers, etc)

@kellytaylor At the moment, it does not. However, don’t be afraid to open an issue as a feature request on the Capacitor plugins repo on GitHub! That way the team can see what features the community wants us to add and we can add it.

Or you could go the @tkclark way and just do a PR to the repo yourself :smile:

@thomasvidas I’ll try and contribute!

1 Like