Flutter Google Maps API Tutorial | Markers, Polylines, & Directions API

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 183

  • @dakevs
    @dakevs 3 года назад +16

    Honestly bruh I'm only 40 seconds in and I'm already a like smasher & subscriber. Thanks for all you do!

  • @shanglee643
    @shanglee643 3 года назад +3

    dang bro, you go super god mode right now.

  • @klkakeklkake4871
    @klkakeklkake4871 3 года назад

    Amazing tutorial for ivorian young man who learn fultter.

  • @catalyysst
    @catalyysst 3 года назад +7

    The best one yet, Thank you so much!
    Don't forget to put [bounds][northeast] if bounds are null in the get Directions

    • @이준명-b8r
      @이준명-b8r 2 года назад

      I want to know how you solved this problem!
      can I get some code or comments?

  • @joshuawarurii3876
    @joshuawarurii3876 3 года назад +2

    If there was love button i would also press it.....thanks bruh you inspire alot

  • @luis96xd
    @luis96xd Год назад +2

    Wow, this was such a complete and helpful tutorial, everything was well explained, thank you so much! 💯

  • @hasankemalturk4416
    @hasankemalturk4416 2 года назад

    The best maps tutorial ever :)

  • @chuxville11
    @chuxville11 3 года назад +4

    Thank You Marcusng for this one...This is Super-Helpful

  • @nazar6222
    @nazar6222 3 года назад +2

    Thanks, it helped me in the project))

  • @SumitSharanSatsangi
    @SumitSharanSatsangi 3 года назад +8

    Hi Marcus, Can you please update the Github code to null safety version?

  • @2099Ai
    @2099Ai 3 года назад

    amazing video mannn!!

  • @flutterdev7203
    @flutterdev7203 2 года назад +1

    5:08
    _destination = null;
    Cannot be performed as the error comes
    'A value of type Null cannot be assigned to a variable of type Marker'

    • @gideonboagontshonyane5473
      @gideonboagontshonyane5473 2 года назад

      Hey mate, how did you fix that error? I am facing it too

    • @AbrarKhan-lo9fx
      @AbrarKhan-lo9fx 2 года назад +1

      @@gideonboagontshonyane5473 Try _destination = null as Marker;

  • @diabeticvirus374
    @diabeticvirus374 2 года назад

    4:05 im doing realtime tracking on users that are connected to my app , the probleme is that i can t add the origin and destination their

  • @cr3amyn3ll66
    @cr3amyn3ll66 3 года назад

    Very good video! Helped me a lot

  • @raghadfahad211
    @raghadfahad211 5 месяцев назад

    I love it!

  • @shoeswholesalerforreseller7633
    @shoeswholesalerforreseller7633 3 года назад

    Man!! You saved my life❤️

  • @thedeadcode5983
    @thedeadcode5983 2 года назад

    Thankyou for an amazing tutorial!

  • @bars_expression6406
    @bars_expression6406 3 года назад +4

    Nice video, learnt a lot from your channel. Can you please make a tutorial on how to write and read video files with firebase, since there not enough tutorials online to learn to handle videos? And videos are an essential feature of most apps.

  • @promaidsdeveloper2000
    @promaidsdeveloper2000 3 года назад

    This is awesome 🙌🙌

  • @kamalpreetsingh7777
    @kamalpreetsingh7777 2 года назад

    Hi, great tutorial apart from that how to track the route live from one place to another and thank you.

  • @anon_pers
    @anon_pers 3 года назад

    Awesome tutorial
    Thank you very much !

  • @walkmandede5958
    @walkmandede5958 2 года назад

    Really Thanks alot sir ...

  • @faisal0paz
    @faisal0paz 3 года назад +2

    someone have the same proble than me? i cant make the condition : "_destination != null" it says that MArker cant be nulleable and always will be true. help please! nice tutorial

  • @hashankannangara8723
    @hashankannangara8723 3 года назад

    Great video !

  • @strangecat6082
    @strangecat6082 2 года назад +1

    How do you make that beautiful animation at the beginning??

  • @berkbugur
    @berkbugur 3 года назад

    very helpful thank you

  • @niklaswerthner1349
    @niklaswerthner1349 3 года назад +2

    How do you do the step 'open Xcode' in Android Studio in windows? Thanks!

  • @FelexAndVirginia
    @FelexAndVirginia 3 года назад +1

    How can you hide Google cloud apiKey if publishing code on github? Or how can i restrict apiKey to be used by only flutter app(ios android web)

  • @julesmercado4769
    @julesmercado4769 3 года назад +2

    Hi Marcus, is it possible to make this update to null safety?

  • @adityahiranwale1279
    @adityahiranwale1279 3 года назад +3

    Hey I have tried the same code from the video but the Polylines don't work I don't know why I've also tried taking the code from your repo also switched my api key with yours but still the poly lines don't show up I can't understand why can you please help me?

    • @abuhurairah5046
      @abuhurairah5046 8 месяцев назад

      same issue here any solution you got?

  • @frankellyguzman4297
    @frankellyguzman4297 3 года назад

    Thank you for real man ♥

  • @리사리사진라면
    @리사리사진라면 3 года назад +1

    Thank you very much. but I don't know how to use it applying null safety. Can you teach me the solution?

    • @dujemandalinic5468
      @dujemandalinic5468 3 года назад

      Yes I got the same error. this is flutter null safety error. Try using
      // @dart=2.9
      at the start of your main.dart file. it will solve null safety error.

  • @Apepsusnendar
    @Apepsusnendar 3 года назад

    thank you Marcus for your video

  • @thomasmabika7291
    @thomasmabika7291 3 года назад +1

    hey Marcus, great video as usual. But how about some animations man? A whole video on some top level, cool looking animations?

  • @iqratariq8610
    @iqratariq8610 2 года назад +2

    Hi Marcus, nice tutorial. Can you please solve this error?
    {
    "error_message" : "Invalid request. Missing the 'destination' parameter.",
    "routes" : [],
    "status" : "INVALID_REQUEST"
    }

  • @shoeswholesalerforreseller7633
    @shoeswholesalerforreseller7633 3 года назад +1

    Could you please make tutorial on state management in flutter..??
    Love from India

  • @ahmdhakimali4179
    @ahmdhakimali4179 2 года назад +1

    Hi Sir, all went good but at last routes returning null and polyline doesn't show up, kindly help what should I do ???

  • @varunlohade383
    @varunlohade383 3 года назад

    I am buying your course!!!

  • @jasonkao5240
    @jasonkao5240 3 года назад +1

    great video as always marcy (pronounced mar-quee)

    • @zuherabud744
      @zuherabud744 2 года назад

      writing documentation for your comment hahah

  • @Dragon878787878
    @Dragon878787878 3 года назад +1

    thank you
    Can you make a video explaining about ARCore
    Augmented Faces by flutter

  • @tuyenvan382
    @tuyenvan382 3 года назад

    Thanks you. For this video

  • @whoman7930
    @whoman7930 3 года назад

    3:56 what is that extension that let us view the error and warning directly next to it, in vscode?
    Can you tell me?

    • @krosf
      @krosf 3 года назад

      Error Lens

  • @mojtabamoaiedi3673
    @mojtabamoaiedi3673 3 года назад

    Thanks for tutorial please this learning with open map street 🙏

  • @vicsystems
    @vicsystems 3 года назад

    I love ur vibe smashed d like button after 30seconds

  • @Pismice
    @Pismice 3 года назад

    hello nice video, i see that few seconds after 3:25 your google maps seems "buggy" i have the same issue with road getting "biggers" and "blurry", did you find and fix or is it normal while using an emulator maybe ?

  • @samsingh0
    @samsingh0 5 месяцев назад +1

    Null safety is making this hell. I can't display my polyline because there's a million issues with nulls :/

  • @abuhurairah5046
    @abuhurairah5046 8 месяцев назад

    routes not created when we add one destination and origin polyine above 0 , 0 is showing why?

  • @laythabdulkareem1887
    @laythabdulkareem1887 3 года назад +3

    You are awesome!
    Hope you do some courses on Udemy!

  • @ahkstudio1566
    @ahkstudio1566 2 года назад +1

    Can you add multiple destination polyline points?

  • @thomasgomes118
    @thomasgomes118 3 года назад +1

    Hello,
    Can you help me? is giving this error.
    Because MAPGO depends on google_maps_flutter >=2.0.0-nullsafety which requires SDK version >=2.12.0-0 =2.0.0-nullsafety which requires SDK version >=2.12.0-0

    • @nnelg.t1232
      @nnelg.t1232 3 года назад

      Change your '"SDK version >=2.12.0-0 =2.11.0-0

  • @sirlegui9268
    @sirlegui9268 3 года назад

    Working on this on Flutter Web, can’t get to show the Polylines on web, is working in iOS and Android but not web. Gets the info correctly but doesn’t show Polylines

  • @khumammm
    @khumammm 2 года назад

    Great! How to add search form input? Any documentation?

  • @josecorona63
    @josecorona63 Год назад

    Hello, is there any way to set indications to the Exactly same Route Polylines? Like Navigation SDK google, but without the SDK

  • @sonmangaking
    @sonmangaking 3 года назад

    Dope again Marcus how do u make ur beginning video animations

  • @raymondmichael4987
    @raymondmichael4987 3 года назад

    Thanks for this.
    Is it possible to add makers on the map and make them connected using this api, what needs to be changed?

  • @AboodTube
    @AboodTube 2 года назад

    help, I'm definitely starting to get the hang of it. Just thought I'd share.

  • @alexyan7245
    @alexyan7245 3 года назад +2

    Hello, Marcus thank you for the tutorial, I have tried your source code, and it's not showing the polyline and the distance and the duration?

    • @MrAvelino2010
      @MrAvelino2010 3 года назад +1

      Facing same problem. I suggest use MapBox direction api, to draw a route we need the set of points to draw route, MapBox give us for free, also give duration and distance. Google maps direction api JSON returned is different from MapBox direction api but they have commun things.

    • @surajshrestha5761
      @surajshrestha5761 3 года назад +1

      @@MrAvelino2010 can you send the code?

    • @fahadpn4350
      @fahadpn4350 3 года назад

      I too had the same issue

    • @fahadpn4350
      @fahadpn4350 3 года назад +1

      @@MrAvelino2010 brother can you send the changed source code?

    • @fahadpn4350
      @fahadpn4350 3 года назад

      @sameh ali did you find any solution?

  • @jacobdedman4015
    @jacobdedman4015 3 года назад +1

    I am having issues because GoogleMapController and Marker objects cannot be null. I was able to get around this issue for the GoogleMapController by adding the late tag in front of the declaration, but I cannot find a workaround for checking if the Markers are null. I get a warning that says they cannot be null so the comparison is always true when checking if != null. Anyone know a fix?

    • @jacobdedman4015
      @jacobdedman4015 3 года назад

      I fixed this by initializing the Markers to have position = LatLng(0.0,0.0) which is very far outside of the intended use area of the app I am building, and compare Marker.position to LatLng(0.0,0.0) instead of checking if Marker == null

  • @sanskarjaiswal2133
    @sanskarjaiswal2133 Год назад

    i am not able to make .env.dart file in lib and polyline and time and distance is also not showing can you please help

  • @runningsky
    @runningsky 3 года назад

    what is the route and polyline based on? is it the shortest route? or what logic is the polyline is drawn off of

  • @bibekgyawali
    @bibekgyawali 2 года назад

    Is there any way we can get the current device latitude and longitude?

  • @Calvin-ok1pg
    @Calvin-ok1pg 3 года назад

    Hi Marcus.. you know in Google map.. I can 'reorder' each location. How do or where do I go and get that tutorial? Thanks.

  • @UniformDelta00
    @UniformDelta00 3 месяца назад

    You didnt secure your keys in the GCP with SHA1 and Bundle ID

  • @siddheshshinde4850
    @siddheshshinde4850 3 года назад

    Cool Video

  • @clemens7759
    @clemens7759 2 года назад

    Hi, is there a way to only diplay one certain country and not show all the others?

  • @LoveKumar-mm5wi
    @LoveKumar-mm5wi 3 года назад

    Without pricing setup we can't hit direction API?

  • @BilalAli-ug5tw
    @BilalAli-ug5tw 3 года назад +3

    Thanks for the amazing tutorial Marcus, I tried this code and it worked well, but I want to know how can we add more destinations.

    • @muhammadbasitamin5829
      @muhammadbasitamin5829 3 года назад

      Your polylines worked? am trying but my polylines are not working

    • @BilalAli-ug5tw
      @BilalAli-ug5tw 3 года назад

      @@muhammadbasitamin5829 What errors are you getting?

    • @fahadpn4350
      @fahadpn4350 3 года назад

      @@BilalAli-ug5tw I too had the same issue. When I checked google cloud console , all requests for directions API showed error with an error code 4xx,

    • @apizcyril9479
      @apizcyril9479 3 года назад

      @@BilalAli-ug5tw sir can you share your code in github and appreciate it if you can answer these guys' questions

  • @seven-tq7jr
    @seven-tq7jr 2 года назад

    "(projectname) wont run without google play services , which are not supported by your device", i enabled the maps sdk for android api though, any help?

  • @boulahnamohammed7697
    @boulahnamohammed7697 Год назад

    I have a Question Please, I want to use google Maps API to get the user's current Speed, is it possible

  • @AppDeveloper-c8k
    @AppDeveloper-c8k День назад

    Thanks

  • @JasperLand
    @JasperLand 2 месяца назад

    This package doesn't use the google maps API it's using the google Android SDK and google IOS SDK.
    The reason I'm calling out this difference is because maps api is unlimited, android sdk and ios sdk have limits to how many requests (currently $200 worth per month at the time I'm writing this) that you can have on your key.

  • @feysalmama8819
    @feysalmama8819 3 года назад

    is it necessary to add billing account to use API key ?

  • @robertosousa2418
    @robertosousa2418 3 года назад

    Nice perfect !!!

  • @RacePace16
    @RacePace16 3 года назад

    Thx bro (:

  • @mosala7001
    @mosala7001 3 года назад

    Thank you, but why the DirectionReposietry always returns with null, even I have enabled all needed service!

    • @mosala7001
      @mosala7001 3 года назад +1

      Never mind, i printed the response and I must enable the billing :D

  • @muhammadawaisawan9791
    @muhammadawaisawan9791 3 года назад +1

    bro its really good video but i have some problems in my code,
    whenever i try to initialize MARKER it give me an error because of null safety, but it is not giving this error to you.

    • @umerasrar8321
      @umerasrar8321 3 года назад

      Yes I got the same error. this is flutter null safety error. Try using
      // @dart=2.9
      at the start of your main.dart file. it will solve null safety error.

  • @TheThunderize1994
    @TheThunderize1994 3 года назад

    Is it possible to add polylines if I have multiple markers and not just 2?

  • @fausto.ospina
    @fausto.ospina 3 года назад

    hello i have this error A value of type 'Null' can't be assigned to a variable of type 'Marker'.
    Try changing the type of the variable, or casting the right-hand type to 'Marker' you helpme please

  • @kentthomas1045
    @kentthomas1045 3 года назад

    Is there a way to make the choices permanent unless reset by a button on the screen?

  • @asheeshmathur
    @asheeshmathur 3 года назад

    Great, which of your course covers this topic of Integrating Google Maps

  • @wdavis6254
    @wdavis6254 3 года назад

    When is the push notification coming?

  • @dewas6237
    @dewas6237 3 года назад

    awesomeee!

  • @amjadhaffar4594
    @amjadhaffar4594 2 года назад

    you saved me

  • @liorpolak1391
    @liorpolak1391 2 года назад

    Fantastic

  • @thelearnfrombasics
    @thelearnfrombasics 2 года назад

    Hi Sir, so do you know how much this would cost monthly ?

  • @deepapandey849
    @deepapandey849 3 года назад +2

    the tutotial is awsm, but why isn't the polyline showing up?!

  • @angelc5022
    @angelc5022 3 года назад +5

    Hi, thanks for this great tutorial.
    Is it possible to place the map in, for example, a container that uses just 1/3 of the screen?
    That way I could use the rest of the screen to place some other information :)

  • @helaolange
    @helaolange 3 года назад

    Is there a way to see a live navigation of any object on maps? Let's say for example a car approaching me miles away?

  • @madhav3573
    @madhav3573 3 года назад

    Hii bro liked all your video, I want to ask is there any charges to enable direction api of google

  • @spydalison
    @spydalison 3 года назад

    Just out of curiosity, which program did you use to make this presentation on your cell phone with the application

  • @Murtaza-Shiraz
    @Murtaza-Shiraz 3 года назад

    For anyone whose route is not displaying, make sure to link a billing account to your Google Cloud project.

  • @sulthanhasanalhakim3454
    @sulthanhasanalhakim3454 3 года назад

    hei, i have problem setstate is not defined, can i get help of this error ?

  • @陳宇泰-d2s
    @陳宇泰-d2s 3 года назад

    my app only shows the total distance, duration, and polyline on the initial build. When I set a new origin and destination, it can't set the destination, which the DirectionsRepository.getDirection ==> reponse.statuscode failed. It only works when I wipe data or rebuild the virtual device again. It may be a memory leak. Wonder you might have the solution to this problem. Overall, I highly appreciate your work and thanks for providing such quality work.

    • @BhuvanTech
      @BhuvanTech 3 года назад

      for me it not showing polylines

  • @BhuvanTech
    @BhuvanTech 3 года назад +1

    for me polyline are not showing

    • @AnkitMishra-th6gb
      @AnkitMishra-th6gb 3 года назад

      enable the google route api from your google account, and also add the billing info their.

    • @lylephillips6456
      @lylephillips6456 2 года назад

      @@AnkitMishra-th6gb Hello are refering to directions api bc theres no route api in cloud console. Please can assist me im also not to draw the polyline eventhough i get and decode the polyline string. Also i have a billing account and directions api enabled

  • @kamleshdurgude2
    @kamleshdurgude2 3 года назад

    Hello sir,
    Thanks you so for such a nice video. It was very helpful for me.
    I have one request. Could you please create a video on How to search Hotels restaurant coffee shops or any Point of interest along the route which we drawn on the map.
    Please if you create that video it will be very helpful for many people. There is not a single video available on RUclips for request query.
    Thank you again.👍

  • @fatihyilmazz
    @fatihyilmazz Год назад

    When I exceed 40,000 requests, it will not automatically deduct money from me, right?

  • @mediumsitompul6914
    @mediumsitompul6914 Год назад

    Great...

  • @abdallahboucedraya
    @abdallahboucedraya 3 года назад

    how to get traffic infos with direction API ?

  • @aytunch
    @aytunch 3 года назад +4

    thanks for this great tutorial however it is a shame that we still can not use widgets, the integral part of Flutter, as markers and we are limited to some rasterized images as markers. I will not use Google Maps until they support this. I don't want my app's map to look like it is from 2012:/

  • @bugrahanaydn5329
    @bugrahanaydn5329 2 года назад

    hi, anyone know how to integrate waypoints ?, ım having a troble while trying it