Flutter Google Map With Live Location Tracking
HTML-код
- Опубликовано: 2 июн 2024
- 🔥Flutter UI Kit: cutt.ly/rFOscFo
In this Flutter Tutorial, You will learn to use Google Maps in #flutter with some customization, like How to set Custom Image Marker and Draw Route Direction Polylines on Google Map.
✅ Starting Code: cutt.ly/BKgylib
✅ Complete code: cutt.ly/XKrC2sp
Learn:
👉 Adding Google Maps to Flutter
👉 Custom Marker on Google Map
👉 Draw Route Direction Polylines
👉 Implement Real-time Location Updates
►For the 3D intro, I'm using Rotato: bit.ly/3heGagj
►Support Us: / theflutterway
► Social Media
GitHub: github.com/abuanwar072
Twitter: / theflutterway
Twitter: / abuanwar072 (my personal profile)
Facebook: / theflutterway
► Timestamps
0:00 Intro
0:12 Project Setup ⚙️
1:31 GoogleMap Widget
1:47 Marker 📍
2:24 Draw route 〰
3:37 Current Location 🗺
4:35 iOS Simulator route setup🍎
4:55 Android Emulator route setup
5:37 Map camera update on location change
6:58 Custom Marker on Google Map📍
8:18 Flutter Shop UI Kit 🔥
Thanks for watching!
Make sure to like + Subscribe For More!
omg, I've been doing a project about google Maps and everything relevant for a month, now I saw your video, that's very helpful. Thank you so much because of keeping doing this.
This dropped in time when I needed it
I was searching for this tutorial for a long time, finally I found it, thank you very much. Make more tutorials on Google map, if possible😍
It feels like you read my mind, right now, I really need this for my thesis, thankyou
I was looking for this for a long time. thank you very much!
Best Flutter channel.Thanks for this.
The best tutorial for live location tracking
Thank you for the tutorial!
Wow so beautifully explained
The best tutorial . thanku man
You deserve more subs man. Great work thank you
Thank you too!
Thank you for great tutorial.
Awesome explanation
amazing tutorial! it helped me a lot, thank you
void getPolypoint()async{
PolylinePoints polylinepoint=PolylinePoints();
PolylineResult result=await polylinepoint.getRouteBetweenCoordinates(
gooleApiKe,
PointLatLng(sourceLocation.latitude,DestionationLocation.longitude ),
PointLatLng(DestionationLocation.latitude, DestionationLocation.longitude)
);
}
gooleApiKe, error in this googleApiKey please solve this
I'm in tears I found this Needed very much
Thank you so much sir
Can we show share the live location on another device (like tracking )
I don't know what this is but it seem perfect for what I need!
you're a genius, thank you!
Awesome tutorial for beginners 🔥
Thank you 🙌
void getPolypoint()async{
PolylinePoints polylinepoint=PolylinePoints();
PolylineResult result=await polylinepoint.getRouteBetweenCoordinates(
gooleApiKe,
PointLatLng(sourceLocation.latitude,DestionationLocation.longitude ),
PointLatLng(DestionationLocation.latitude, DestionationLocation.longitude)
);
}
gooleApiKe, error in this googleApiKey please solve this
Amazing video for flutter google map
woow thanks man , i like the voice overs ones
Glad to hear that!
AWESOME, thanks for shairing!
Thanks for watching!
This tutorial is great solution for many of us which we are looking for.
Glad it was helpful!
Amazing. Needed this
Glad you like it!
you are the best flutter dev thank you.
Thank you, means a lot!
Excellent I appreciate 👍
Thank you very much 👍
Hi I like your video but I've a question. Is there any problem with location pack. I couldn't add it to dependencies. Do you have any idea ?
Thanks man..awesome tutorial.
Glad you liked it!
Thank you very much
Do you have any beginners course?? Your way of explaining things good. 😊
Great one
Thanks you very much
Thank youuuuu
Nice Tutorial.
Many many thanks
Can you do this with flutter_map plugin and with geoapify or openrouteservice api instead of google map?
Hello and thank you for the amazing informative video.
I was wondering if this could be used for indoor navigation in a large institute (my university) if it is already on google maps but there are direct routes between the buildings
were u able to make the indoor navigation app cuz i also need help with it
@@salehjamali6716 GPS satellites don't work properly inside buildings.
Which apis should I enable for api key in Restrict key?
Please answer my question!
is not drawing a line in my project
If we move from point a to b in reality , will the app show our collect position as we move , please tell ?
এই চ্যানেলটা যে বাংলাদেশের সেটা অনেকেই জানেন না। 💚💚💚
Is it possible to use this map and set a waypoint to a bluetooth powered device ie an airtag?
i really love your video,very entertaining. But how can i get the location into textformfield ?
Thank you so much
You're most welcome
the polyline direction is using Google Maps Directions API right ? is it paid ? what is the pricing mechanism on it. i don't have clear information on their web. many thank you 🙏
How can i enable the location and speed setting page in physical device? You are doing on simulator .i have to do in physical device. waiting for your reply?
How can I put more than two dots, respectively showing directions between them?
Just what I need. Thank you.
Glad it helped!
Sir, for this type of of google map is taken any charge or cost by google ?
In this video, I can't understand which api we will be charged for. I watch a lot of videos. For example, in this video, we will be charged through the static view api and the places api, after all, there are both. Can you help?
Became a patron but having a hard time understanding source code with code of this video. For example, there is a "map_sample.dart" but not an "order_traking_page.dart". It appears they are the same. But how is the code edited in "map_sample.dart" in relation to following along with this video?
If you want to follow along with this video check this one, www.patreon.com/posts/live-order-on-67926457
Can we use same for flutter web. And wanted to use route with more than 2 lat long
bro to use google maps need login in google could to enable this API ? or don't needs that just like you i can use google maps ?
its good if u can show how we can add packages too
But once you call setstate won’t this mean extra costs going to Google for reloading the entire app? If you update the location you certainly want to avoid map reloads, right? Or am I wrong?
same question
Hello sir i would be kind of you to do a video on dio caching and offline network handling
Thanks for putting together this nice and awesome flutter tutorial
You're very welcome Reza ❤️
can u create freelance on demand projects?
Flutter UI Kit looks great! It's a steal to get all those pages for just $99. Do you provide updates after purchase for a limited time like how Web Dev template creators do?
Yep, soon I will release a new update.
hi you have code?
@@information_everytime You can buy it.
@@AlexanderSuraphel no
Amazing
Thanks
Love you for this but can you make a complete food delivery app including live tracking.
Noted!
Brigth video Thanks. Please upload using flutter bloc Google maps, tracking, Location
Noted!
can you make a geofencing tutorial as well?
I followed everything, but my currentlocation is not moving, but when I print the LAT and LON they change a little bit. The marker of my current location just moves a little bit the ngoes back to normal position. :( :(
I am using Windows Android Emulator. Do I have to move in my current location in order to see my current location marker move? I guessthat is the problem of Windows or Android Emulator? Because Macs has `Freeway Drive`?
How Can I use text instead of image inside the marker icons?
Cool demo with a simplest code
Glad you like it!
i want to show multiple markers as it is a tracking app
Is it possible in this kindly reply its urgent
how can i show traffic for polyline bro. thanks
hi this was amazing❤
how we can add white plane customized map instead of using google map,could u please do the tutorial for it.
Hi how were you able to clone the starting project
great tutorial! i have only one question. In the video at min 4:07 u restart the app for update current location from null to current lat lng. Know you a method without restart the app or maybe update automatically the current location without restart the app?
Same issue here. infact the app is crashing When I try to hot reload. the currentLocation variable is always null and keep on “Loading” any resolution for this issue?
@@gtkmike5141 I am facing the same issue after completing the code snippet from the video.
Did you resolve?
did you resolve?
@@syedhussain5488 did you resolve?
@@gtkmike5141 did you resolve?
hello, Im setting all the dependecies for google map but it's not working, while executing the screen stays white the map not displaying
LocationData is a class ? where find it?
is there a way to remove the polylines as you move forward..(i tried the directionApi request in a loop using a timer)... i wamr to know if there is any other way
I think it should be possible if you generate polylines again after updating the current location variable
okay i guess im doing something wrong here, for the current location im getting the default google location how can i change it
I have a little problem with this code. Using this kind of location, I can't use Zoom option. I mean, when I'm trying to zoom out, the camera positions always return to the same state/position,, any idea ?
Is this at the end, after adding the icons? Cause I have the same problem. I click the + but it keeps zooming out.
I solved my problem, this caused because the camera zoom is always reloading from the widget@@dawnriddler
does that need billing or need to pay for showing polylines? because every time i try it returns empty array/list of polyline results
Hi, have you find the solution ?
@@sevikharvarid9893 yup you need to set your billing method on Google console. Polyline api is paid.
please give me name of the song at the end of the video
Excuse me,
does google charge us from using this api ? or is it some kind of our creativity, which mean we only use google map to display map?
Hi how can I set my source location as the current location of device and destination as the location from firestore?
I also want to do this..... Help me plz
Did you do that ?
I have stuck in one issue that my marker is not moving however my LatLng is updating continuously
Just in time
Great work..I think you will be work better if it is true show it some more useful content..
What if the app is closed will it still detect location ? Please reply!
Where can i get the custom markers
is the google map API need to pay to be use?
Next Up, please do Stripe flutter payment tutorial 😃 please please please I would love to learn it from you
Noted!
thanks for the video but the link to the complete source code is not working. can you share a new link thanks
tks sir
Welcome
hello friend great video but there is an issue at polyline not drawing route on the map, please tell me how could i solve this issue?
having same issue :/
having same issue
Constantly getting a null check error for LocationData? currentLocation
is the API used in this project billing-enabled, i'm having some trouble and think that might be the prob
You should use your own API.
@@TheFlutterWay I'm using my own non-billing API and having some problems, just asking to make sure billing is the problem here. Like, is billing a MUST to use the Directions API ?
@@khuongnguyen3544 To use the Directions API, you must enable billing on each of your projects and include an API key with all API or SDK requests. The Directions API uses a pay-as-you-go pricing model.
मैं अपने पीसी से ऑडियो सुनने के लिए बहुत इच्छुक हूं
main apane peesee se odiyo sunane ke lie bahut ichchhuk hoon
plz make video on full text search from firebase
Noted!
I have problems when launching the app, it stucked in loading screen!!! please help
I found an issue from your video, you are using setState method all the time when the current marker is moving. If it is true, you have to set delayed time to call setState. Thanks for reading my ideas.
Thank you so much, great idea!
can you please elaborate how you are saying to use delay ?
@@abhishekjain5986 The author is using setState method all the times, if you do not delay your app will be lagged and could crash any time
@@jackle7425 thanks for replying. Do you have a workaround for that?
@@abhishekjain5986 you can change the interval as such await location.changeSettings(accuracy: LocationAccuracy.high, interval: 1, distanceFilter: 0.1);
works on web?
@The Flutter Way
you may wanna remove your api key at 1:17
take care brother.
it gives an error
CastError (Null check operator used on a null value)
same did you solved it?
Why polyline doesn't appear in my emulator?
a request to you that please keep the video speed as normal,. Too fast to catch. Thank you.
How to use this on flutter flow
The result of this program is “ Loading” only. the current location variable is always throwing null result. any solution for that?
do you have an answere yet?
i found it in the android mannifest file you have to have this