Google Maps Example in Docs - ReferenceError: Can't find variable: createMap

The template can only see your script functions and variables if you export them OR switch <script> to <script setup>. See the vue docs to learn about “script setup”.

And I hope you’ll also leverage Aaron’s recent post for adding Google maps to Vue Ionic Capacitor projects: How to use the Ionic Capacitor Google Maps Plugin with Vue JS

1 Like