How to use the Capacitor Google Maps Plugin with Ionic

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 92

  • @FrederikHeld
    @FrederikHeld Před 3 měsíci +1

    Hey Simon, it would really help if you could mention the version of all packages that you are using in your videos. I'm trying the exact steps you describe today (06/2024) and the map won't show up on iOS (it works on Android and Web though). I'm on 6.0.0 of everything (@capacitor/google-maps is 6.0.0-rc.0 because - as opposed to your claim - they did not officially update the plugin in time for the Capacitor update).

  • @jagatbandhu2601
    @jagatbandhu2601 Před rokem +4

    In Android the map is not showing now

  • @pedropato3535
    @pedropato3535 Před rokem +1

    Somehow it didn't work for me, and I've been trying for the last 4 days.
    It always ends up with error on "mapRef", "map:" (GoogleMap) and on mapsKey.
    I'm completely clueless on what's wrong.

  • @geronimovelasco
    @geronimovelasco Před 2 lety +2

    Nice tutorial Simon, Thanks!

  • @aprikrnwn
    @aprikrnwn Před 2 lety +1

    hello, nice for tutorial,. how to change custom icon marker, i use property iconUrl but not working.

  • @alberbm1609
    @alberbm1609 Před rokem +1

    you can integrate place autocomplete with maps

  • @ericamarchi2699
    @ericamarchi2699 Před rokem

    great tutorial! How can I prevent on mobile the popup opening when click on marker? I wanna use only the bottom sheet for ios, android and web!

  • @Amitluvsmou
    @Amitluvsmou Před 2 lety +1

    Again awesome video! Simon

  • @henriquev_6456
    @henriquev_6456 Před rokem

    Hey can you answer pls, how can i use a custom marker for this method?

  • @MobilitySolUY
    @MobilitySolUY Před 10 měsíci

    Hi Simon! Thanks for the videos, btw, i want to add polygons on my map, but im not being able to do it. I know there is a function addPolygons but idk how to pass my coordinates to generete it. Any solution?? Thanks!

  • @mayconnwillian8617
    @mayconnwillian8617 Před rokem +1

    I saw that you put the map creation inside an "ionViewDidEnter", that means the map will be created all the times you get in that screen?

    • @galaxies_dev
      @galaxies_dev  Před rokem

      Yeah probably better to add it to ngAfterViewInit!

  • @AbhiLM
    @AbhiLM Před 10 měsíci

    Hi Simon, is it not showing in web view? like if i use the size more than 800width then will it not work? and if yes then what is the solution?

  • @ChristianRVN
    @ChristianRVN Před rokem

    Hi Simon, thanks for this! Just one question, how can I set the marker and get the coordinates when the user click on the map?

  • @pratap4u436
    @pratap4u436 Před rokem

    In my case getcurrentlocation is taking long time 45sec Or more in ios ... Any suggestion?... Also tried watch position but it's behaviour is random sometime fast sometime slow

  • @rajandhinoja1976
    @rajandhinoja1976 Před 2 lety +2

    Hi Simon, I have used capacitor map inside the modal as a component. I tried the ion-content background to none it is still not working in the android real device. It is working on the web. Please help me out. I am using M1 for development.

    • @FANTHERFUCK
      @FANTHERFUCK Před rokem

      I have the same problem, do you solved it?

    • @rajandhinoja1976
      @rajandhinoja1976 Před rokem +1

      @@FANTHERFUCK Not yet. I switched to old cordova plugin instead of capacitor.

    • @alantlx
      @alantlx Před rokem

      @@rajandhinoja1976 Do you have an example?, I have the same problem

    • @arbelaezdiego
      @arbelaezdiego Před rokem

      @@rajandhinoja1976 do you have a video about cordova plugin working in ios and android? this capacitor plugin is not working in ios. Thanks!

    • @FANTHERFUCK
      @FANTHERFUCK Před rokem

      @@rajandhinoja1976 nice, I used Mapbox insted the google maps and my problem is fixed.

  • @mmarcoscolombo
    @mmarcoscolombo Před rokem

    Hi Simmon! Do you know other plugin to show maps than google maps? Thanks!

  • @user-mo3hm8cs3l
    @user-mo3hm8cs3l Před rokem

    Thanks Simon! How would I "DRY" up the key use by dynamically putting it in the Android manifest file from my environment?

  • @rex7200
    @rex7200 Před rokem

    Hi, Simons I am trying to change the map type. But map.setMapType(MapType.Satellite) is not working in web or android.

  • @shinez6241
    @shinez6241 Před rokem

    Hi Simon, Thanks for the nice tutorial. One question , how we show the route map from multiple gps coordinates?

    • @galaxies_dev
      @galaxies_dev  Před rokem

      I think that's not (yet) possible with the Capacitor plugin!

  • @prashant43240
    @prashant43240 Před 2 lety +3

    Hi Simon 🙂.. Please make tutorial on audio video call using webrtc

  • @mahmoudmirzaei4701
    @mahmoudmirzaei4701 Před 10 měsíci

    Hi Simon, Thanks for your great tutorial...
    Have you tested the app on an emulator? I have done what you said step by step, working on chrome, but not a physical or emulating device!

  • @jacoboarcemendizabal7036

    Thanks so much, I have a question, How make geofencing in ionic 5, with capacitorJS or cordova?

    • @galaxies_dev
      @galaxies_dev  Před 2 lety

      Haven't implemented that yet, sorry Jacobo!

  • @pnvsrinivas
    @pnvsrinivas Před 2 lety

    HI sir, I saw your both videos of "How to pass data b/w pages". But could you please do a small video on "How to encode the data in the URL". I mean the query parameters that we pass while navigating to other page will be visible/readable by users on the address bar, instead can we encode the data and decode it from app.module itself ? (we tried HttpParameterCodec but it is at each page, instead can we do at app.module level )

  • @cezaraugustomezzalira5230

    Hi Simon, how are you going?
    Did you checked the property snippet was empty when you click on marker? I check this behavior here and I saw your video after implementing here.
    I hope this and other things you said on video has been fixed soon :)
    Thanks for sharing this content with us!

    • @galaxies_dev
      @galaxies_dev  Před 2 lety +1

      Yeah it's still a very early look at the plugin and I'm sure the Capacitor team is actively working on the next updates already - otherwise you can open an issue on the Github repo!

  • @vipinmishramd
    @vipinmishramd Před rokem

    Hello sir, this is nice video. Thanks 4 this. I have a Question, How can we implement route direction between two locations like google map, ola ubar

    • @galaxies_dev
      @galaxies_dev  Před rokem

      You could use the Directions API from Google for that!

    • @brandon400
      @brandon400 Před 6 měsíci

      bro could you implement directions api? in mobile

  • @CyberiaSoft
    @CyberiaSoft Před 2 lety

    It doesn't work on android, if I try it with Ionic LAB it works without problems, but when I run it on ANDROID the screen remains black, do you know what the problem could be?

  • @willydavid_
    @willydavid_ Před 2 lety

    There is a plugin with support for places?

  • @afitoo4403
    @afitoo4403 Před 2 lety

    Hello, just did like you guided but i dont see my map and in logs i can see: Line 1 - Msg: ERROR Error: Uncaught (in promise): Error: "CapacitorGoogleMaps" plugin is not implemented on android
    Error: "CapacitorGoogleMaps" plugin is not implemented on android

  • @mmashabanemogoboya7686

    how do i disable the map type controls?

  • @MariaDumitrescu-fo7pt
    @MariaDumitrescu-fo7pt Před 2 lety

    Hi, Simon! Is there a way to draw route from multiple points to a map with this plugin? It is equivalent of polyline as the previous versions already have. If you have the possibility, please help me! Thanks!

  • @vincenzodamico3054
    @vincenzodamico3054 Před 2 lety

    Hi Simon, Thanks for all 💙, seems that on mac with M1 Chip GoogleMapsUtils doesn't works on external device... 😢

    • @vincenzodamico3054
      @vincenzodamico3054 Před 2 lety

      SORRY !!! saw only now
      The Google Maps SDK currently does not support running on simulators using the new M1-based Macbooks. This is a known and acknowledged issue and requires a fix from Google. If you are developing on a M1 Macbook, building and running on physical devices is still supported and is the recommended approach.
      Thanks for all 💙

    • @galaxies_dev
      @galaxies_dev  Před 2 lety +1

      Thank you for posting the "solution" Enzo - only tried this on a real device!

  • @brandon400
    @brandon400 Před 6 měsíci

    is it secure to put clean api key in android manifest?

    • @galaxies_dev
      @galaxies_dev  Před 6 měsíci

      Depends on whether you would use that key in a frontend app like a website as well?

  • @estebansalinas3360
    @estebansalinas3360 Před 2 lety

    great tutorial bro, when I try to put inside an ion-card it doesn't show me the map. any solution for that?

    • @galaxies_dev
      @galaxies_dev  Před 2 lety +1

      Not sure if it can work like that as the native webview is basically behind your app, so you would hide the rest of the UI and the card!

  • @DjAdfrox
    @DjAdfrox Před rokem

    Hello Simon , is it possible to integrate ion-fab button with google-maps capacitor?

    • @galaxies_dev
      @galaxies_dev  Před rokem +1

      I think so, you just need to play around with the different layers and opacity in your app then!

    • @DjAdfrox
      @DjAdfrox Před rokem

      @@galaxies_dev thank you very much, i will keep testing this

  • @ahmaat19
    @ahmaat19 Před 2 lety

    I was looking this video. I'm new to Ionic dev, but does this plugin support autocomplete places?

    • @galaxies_dev
      @galaxies_dev  Před 2 lety +1

      No don't think it does at this point, also think it's a different Google API you have to use for that!

    • @ahmaat19
      @ahmaat19 Před 2 lety

      @@galaxies_dev yeah, I'm using now other js package. Thanks

  • @CarlosSanchez-dp9wv
    @CarlosSanchez-dp9wv Před 2 lety

    Is there a way to listen to a marker's drag and drop event?

  • @dddanielsr
    @dddanielsr Před rokem

    Hi Simon, I tried both of your tutorials of the google maps pluggins. But both are failing on my android App, I can use them on the browser, but in mobile the element is present but there's no map displayed

    • @niphyanto3146
      @niphyanto3146 Před rokem

      Hi..did you get any solution for the issue. I am also facing the same issue

    • @dddanielsr
      @dddanielsr Před rokem

      @@niphyanto3146 I quit trying one month ago, I had to settle down for mapbox... I am not pleased with that workaround but it is working

  • @Axelazo
    @Axelazo Před 2 lety

    Hey Simon, I tried to use Capacitor with React, it worked once, but then I started getting this error Failed to parse source map from
    ode_modules\@googlemaps\markerclusterer\src
    enderer.ts

  • @arbelaezdiego
    @arbelaezdiego Před rokem

    somebody could make it work for ios? White screen and no map is showed... :(

  • @yuchenglin2894
    @yuchenglin2894 Před rokem

    is this plugin free of charge from google(SKU:Mobile Native Dynamic Maps / GMSMapView)?

    • @galaxies_dev
      @galaxies_dev  Před rokem

      I think there is a limit in terms of requests after which you have to pay for the Google API.

    • @yuchenglin2894
      @yuchenglin2894 Před rokem

      @@galaxies_dev According to the Google Maps - Usage and Billing policy listed here, the "SKU: Mobile Native Dynamic Maps" with the "A GMSMapView object on iOS" is always charged with 0.00 USD. 🤔

  • @DawitAbraham-ox2zw
    @DawitAbraham-ox2zw Před rokem

    Any idea how to draw line between 2 markers?

    • @galaxies_dev
      @galaxies_dev  Před rokem +1

      I think it's not yet implemented for this plugin :/

    • @brandon400
      @brandon400 Před 6 měsíci

      could you do it dawit?

    • @DawitAbraham-ox2zw
      @DawitAbraham-ox2zw Před 6 měsíci

      No, this feature was not implemented yet. So I ended up using Google Maps JS plugin instead.

    • @brandon400
      @brandon400 Před 6 měsíci

      @@DawitAbraham-ox2zw you mean you put in your html?
      at the end you didnt use the capacitor plugin right?

  • @jehureyna3887
    @jehureyna3887 Před rokem

    i love you bro

  • @finnlau3349
    @finnlau3349 Před 2 lety

    Hey Simon, how can I disable all the UI ?

    • @prashant43240
      @prashant43240 Před 2 lety

      Yes

    • @finnlau3349
      @finnlau3349 Před 2 lety

      @@prashant43240 how can I do that?

    • @nodiced1
      @nodiced1 Před rokem

      @@prashant43240 yes with no code is such a lazy and unhelpful answer

  •  Před 2 lety

    Can you please do that with Apple Maps JS? 🤩

  • @user-zj3ne1im9n
    @user-zj3ne1im9n Před 4 měsíci

    desde España ole ole y ole

  • @unknownroad
    @unknownroad Před 2 lety

    is there any free alternative to google maps?

    • @galaxies_dev
      @galaxies_dev  Před 2 lety +1

      I think Leaflet for example: leafletjs.com/

  • @balintlengyel6305
    @balintlengyel6305 Před rokem

    Hello Simon! Great tutorial again!
    I have az issue when I try this feature on real phone. (On Web it is working)
    "java.util.concurrent.ExecutionException: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=io.ionic.starter"
    Any idea? :)

    • @galaxies_dev
      @galaxies_dev  Před rokem

      Have you restricted your Maps key to a specific bundle ID for mobile apps?

    • @balintlengyel6305
      @balintlengyel6305 Před rokem

      ​@@galaxies_dev Thank you for your fast reply. I use same ID for all, but I will create separe ID for different devices. Thank you

    • @brandon400
      @brandon400 Před 6 měsíci

      it it necessary to restric api key?

  • @francolondra3350
    @francolondra3350 Před rokem

    Hello, this problem happened to you, when you move and open another page or other tabs or some modals many times?
    E/Capacitor/Plugin: Unhandled Error: null.
    java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.next(ArrayList.java:860)
    at com.capacitorjs.plugins.googlemaps.CapacitorGoogleMapsPlugin.dispatchMapEvent(CapacitorGoogleMapsPlugin.kt:541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:125)
    at com.getcapacitor.Bridge.lambda$callPluginMethod$0$com-getcapacitor-Bridge(Bridge.java:721)
    at com.getcapacitor.Bridge$$ExternalSyntheticLambda5.run(Unknown Source:8)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:236)
    at android.os.HandlerThread.run(HandlerThread.java:67)
    D/Capacitor: Sending plugin error: {"save":false,"callbackId":"99599765","pluginId":"CapacitorGoogleMaps","methodName":"dispatchMapEvent","success":false,"error":{"message":"Unhandled Error: null.","code":"0"}}
    V/Capacitor/CapacitorGoogleMapsPlugin: Notifying listeners for event isMapInFocus
    V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 99599768, pluginId: CapacitorGoogleMaps, methodName: dispatchMapEvent
    V/Capacitor: callback: 99599768, pluginId: CapacitorGoogleMaps, methodName: dispatchMapEvent, methodData: {"id":"map","focus":false}
    V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 99599769, pluginId: CapacitorGoogleMaps, methodName: dispatchMapEvent
    V/Capacitor: callback: 99599769, pluginId: CapacitorGoogleMaps, methodName: dispatchMapEvent, methodData: {"id":"map","focus":false}
    And did you see this amount of logs in the chrome console?
    (this is a part, I saw more than 3000 logs and these logs keep increasing the more you move and change pages or tabs, they don't stop when changing pages)
    xVM3:243 native CapacitorGoogleMaps.dispatchMapEvent (#99599732)
    VM3:217 result CapacitorGoogleMaps.addListener (#99599116)
    VM3:243 native CapacitorGoogleMaps.dispatchMapEvent (#99599733)
    VM3:217 result CapacitorGoogleMaps.addListener (#99599116)
    VM3:243 native CapacitorGoogleMaps.dispatchMapEvent (#99599734)
    VM3:217 result CapacitorGoogleMaps.dispatchMapEvent (#99599732)
    polyfills.8a98a597f426b6b1.js:1 Unhandled Promise rejection: Unhandled Error: null. ; Zone: ; Task: Promise.then ; Value: Error: Unhandled Error: null.
    at returnResult (VM3:741:32)
    at win.androidBridge.onmessage (VM3:716:21) Error: Unhandled Error: null.
    at returnResult (localhost/:741:32)
    at win.androidBridge.onmessage (localhost/:716:21)