Google Maps Draw Route Between two locations in Android | Shortest Route | 2020 | Source Code

  Рет қаралды 36,465

Tech Mirrors

Tech Mirrors

4 жыл бұрын

This video is about how to find shortest route between 2 locations in android studio 2020.
Follow these 6 easiest steps to Add polyline between two latlng in Android Studio within your Android App.
This Tutorial will also Cover:
1)How to find a shortest route between 2 locations in android studio.
2) How to integrate google maps in your Android App.
3) How to get user current location in Android.
4) How to add marker on the google maps in Android.
5) How to animate camera to a location in google maps in Android.
6) How to get location latlng by touching on a location on Map.
7) How to add location permissions in Android.
8) How to add polyline on google map.
9) How to create Google Maps Api key and enable billing.
Thanks for watching this video!
And if you like the video and it was helpful for you, then please subscribe to our channel for more such videos and also give suggestions to improve our content in comment section. It will be very helpful for us. Thank you.
Project Link: github.com/hamza-ameer/Google...
Google Maps Routes finding Guide link: github.com/hamza-ameer/Google...
Get Google Maps Api from: console.cloud.google.com/goog...

Пікірлер: 85
@dilshodiskandarov7144
@dilshodiskandarov7144 3 жыл бұрын
Katta Rahmat. Bizga juda foydali bo'ldi.
@mahmuduulkarimlincoln7932
@mahmuduulkarimlincoln7932 3 жыл бұрын
Thank you so much Jaan!!!! 100% worked for me!!!
@DanielArias-rm8sc
@DanielArias-rm8sc 4 жыл бұрын
muchas gracias amigo, funciona perfecto !!!!
@BalaMurugan-qi3di
@BalaMurugan-qi3di Жыл бұрын
Thank you man your code Helps me 🙏🙏🙏
@AsadKhan-qv8uo
@AsadKhan-qv8uo 3 жыл бұрын
Love u bro.. Good work
@marianacoronaaldana7547
@marianacoronaaldana7547 2 жыл бұрын
Hello! I have a tricky question, sorry for bother you. I want to make an app that makes routes based on how secure it is (let's say, I already have the number of delits that a Suburb has) so what I want to know, is there a form to still use the API of google maps for this?
@AmandeepKaur-qg2re
@AmandeepKaur-qg2re 2 жыл бұрын
Owsome ! its helpful for me , Please make application how to go car on any path (google map)😊
@rizwansayyed5043
@rizwansayyed5043 3 жыл бұрын
Can you help me i want to load data from my database in google map but only till limit space only at at place which is visible, and when user scroll its should load more data can you please help me with this query..
@blackzero4703
@blackzero4703 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance and time between two locations
@dev.Mongam
@dev.Mongam 3 жыл бұрын
Thank you so much for the code @Tech Mirrors How to set my destination, can someone help me please.
@gilreandelar2507
@gilreandelar2507 3 жыл бұрын
thank you for this! very informative. I have only one question. if the trial end, do I need to pay ? thanks a lot. I'll leave a sub and like
@user-gz7lj7jw7r
@user-gz7lj7jw7r 3 жыл бұрын
what's the answer?
@elifozoglu1677
@elifozoglu1677 3 жыл бұрын
@@user-gz7lj7jw7r Once you reach the limit, you will have to pay.
@fingerfighters9999
@fingerfighters9999 Жыл бұрын
they wont charge when you reach the end of trial, they will ask you to upgrade
@RAHULKUMAR-dm9cc
@RAHULKUMAR-dm9cc 4 жыл бұрын
Do I have to pay for enabling billing?
@axeyou8214
@axeyou8214 3 жыл бұрын
its nice and work . but i have question why the alternative_routes doesnt work? its already set true?
@gungwidi275
@gungwidi275 3 жыл бұрын
thank you, but whether to buy google maps api too.?
@c00per_
@c00per_ Жыл бұрын
Bro should we pay money please tell if we enable billing
@bearecabar8603
@bearecabar8603 3 жыл бұрын
i got error on my getMyLocation function mMap.setMyLocationEnabled(true); ----- error please help
@williammendoza628
@williammendoza628 3 жыл бұрын
com.directions.route.RouteException: You must eneable Billing on the google cloud. help!
@hafsa5611
@hafsa5611 3 жыл бұрын
Please how can I draw a cycle (circuit) multiple points ?
@tayyab92
@tayyab92 2 жыл бұрын
Perfect
@mrtyilmaz
@mrtyilmaz 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance between two locations
@techmirrors5143
@techmirrors5143 4 жыл бұрын
Check this link to Calculate Distance: stackoverflow.com/questions/1502590/calculate-distance-between-two-points-in-google-maps-v3
@mrtyilmaz
@mrtyilmaz 4 жыл бұрын
@@techmirrors5143 thank you very much
@ulvisharifzade7811
@ulvisharifzade7811 3 жыл бұрын
@@mrtyilmaz Merhaba.Kod calisdimi?
@naiffarhan4603
@naiffarhan4603 3 жыл бұрын
how to place the destination location? i mean no need longclicklistener
@mathankumar4844
@mathankumar4844 4 жыл бұрын
this ip site or mobile application is not authorized to use this api key
@juangonzales6405
@juangonzales6405 3 жыл бұрын
ya no funciona porque en en restringir api no aparecen mas esas opciones.
@Lailai-vy4tz
@Lailai-vy4tz 4 жыл бұрын
thank you for this video. I have a problem. when I run app my phone and touch the destination, system show me "com.directions.route.RouteException" how can I solve it?
@letymay3178
@letymay3178 4 жыл бұрын
.me too, help :'(
@moversinc.939
@moversinc.939 4 жыл бұрын
same problem
@nitikagurral4140
@nitikagurral4140 4 жыл бұрын
yes i have the same problem......were you able to resolve it?
@buddhikap.desilva2897
@buddhikap.desilva2897 3 жыл бұрын
replace project gmap key with your gmap key.
@mineskgrayce3169
@mineskgrayce3169 3 жыл бұрын
Just in case anyone needs it, you need to unrestrict your Google Maps API key, or use a new one that allows HTTP referrers and web servers.
@parkjiji6701
@parkjiji6701 4 жыл бұрын
it doesn't work with me , can you help me please !!?
@shraddhashaha9598
@shraddhashaha9598 3 жыл бұрын
i get this error Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-v4-23.0.0-runtime (com.android.support:support-v4:23.0.0) can u help me resolving it
@user-pc5xz9oj6c
@user-pc5xz9oj6c 3 ай бұрын
delete this from manifest implementation 'com.google.android.material:material:1.1.0' .. u add metrial design twice
@engr.usman80
@engr.usman80 2 жыл бұрын
How to draw polylines on multiple markers using direction API?
@c00per_
@c00per_ Жыл бұрын
Did you make it? Say please
@medalibenmassoud3901
@medalibenmassoud3901 3 жыл бұрын
Hi Tech Mirrors, I have a problem, when I run my app, it doesn't show me the routes between two locations, it only opens google maps and when i select location the app closes, Please Help
@frankfernandes718
@frankfernandes718 3 жыл бұрын
ye araha hai na This IP, site or mobile application is not authorized to use this API key mujhe bhi araha hai
@frankfernandes718
@frankfernandes718 3 жыл бұрын
for me its showing This IP, site or mobile application is not authorized to use this API key what might be the issue
@danielmwinzi9223
@danielmwinzi9223 2 жыл бұрын
i have the same issue did you manage to solve it
@alvintan227
@alvintan227 Жыл бұрын
I get an error while finding route, why is that happening
@waqarbangash4158
@waqarbangash4158 4 жыл бұрын
bhai agr billing enable na karo tho Direction find nai hosaktha???
@techmirrors5143
@techmirrors5143 4 жыл бұрын
Nai bhai. Direction api paid hai, billing k bgair nahi use kr sakty.
@moversinc.939
@moversinc.939 4 жыл бұрын
I get this error : { "error_message" : "The provided API key is invalid.", "routes" : [], "status" : "REQUEST_DENIED" } I have checked the entered Key, Please Help!
@techmirrors5143
@techmirrors5143 4 жыл бұрын
your api is invalid as shown in error message
@souravkarjole7587
@souravkarjole7587 Жыл бұрын
Getting same error here....Have you solved the issue mate??
@medjl6083
@medjl6083 2 жыл бұрын
Where the location latitude and longitude أين ال variable التي سأكتب فيها المكان الذي سأقوم بالذهاب إليه.
@InternetKiDuniya
@InternetKiDuniya 4 жыл бұрын
Show error:- you must enable Billing ..... Request Denied Im enable the billing and verify but stil show me same error how to solve sir
@techmirrors5143
@techmirrors5143 4 жыл бұрын
make sure you'r using correct api from your google account on which you enabled billing. this error shows when billing is not enabled so please verify all the procedures again.
@bushrarasheed8477
@bushrarasheed8477 4 жыл бұрын
ye free tail ni deta ??udr to free trail likha hua hai then how can you say that k paid hai api??
@techmirrors5143
@techmirrors5143 4 жыл бұрын
Some features you can use in free but not all. paid features like routes, places needd to enable your trial.
@bushrarasheed8477
@bushrarasheed8477 4 жыл бұрын
@@techmirrors5143 ye koi operation perform ni kr raha hai jb k mene key nhy implemnt key hai or video 2 bar dekhi hai???what should i do now?
@powercat8528
@powercat8528 3 жыл бұрын
din't see using locations...
@harvyabo3381
@harvyabo3381 2 жыл бұрын
this tutorial will teach you just how to copy-paste. cannot explain how codes run :/
@user-nx6tv4vc9p
@user-nx6tv4vc9p 2 жыл бұрын
I have problem (error) with @Override
@-kingduckthexiii4938
@-kingduckthexiii4938 Жыл бұрын
did you type the method name correctly? and did you extend the necessary class?
@waqarbangash4158
@waqarbangash4158 4 жыл бұрын
route finding error aa raha ha.....
@techmirrors5143
@techmirrors5143 4 жыл бұрын
billing enable ki apny?
@waqarbangash4158
@waqarbangash4158 4 жыл бұрын
@@techmirrors5143 ni bhi ...wo card ka option mang raha ha....
@techmirrors5143
@techmirrors5143 4 жыл бұрын
Direction api paid hai usk liye billing enable hna required hai nai tu route finding api nai chly gi.
@waqarbangash4158
@waqarbangash4158 4 жыл бұрын
@@techmirrors5143 ok bhai....thanks alot....
@virajbenade5572
@virajbenade5572 8 ай бұрын
not working🙄🙄
@LuffyD-lv1lr
@LuffyD-lv1lr 8 ай бұрын
Did you get any reference then ?
@abdullahmalkawi4595
@abdullahmalkawi4595 4 жыл бұрын
please help
@techmirrors5143
@techmirrors5143 4 жыл бұрын
yes #Abdullah how can i help you?
@dilshodiskandarov7144
@dilshodiskandarov7144 3 жыл бұрын
Katta Rahmat. Bizga juda foydali bo'ldi.
@blackzero4703
@blackzero4703 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance and time between two locations
@dilshodiskandarov7144
@dilshodiskandarov7144 3 жыл бұрын
Katta Rahmat. Bizga juda foydali bo'ldi.
@dilshodiskandarov7144
@dilshodiskandarov7144 3 жыл бұрын
Katta Rahmat. Bizga juda foydali bo'ldi.
@dilshodiskandarov7144
@dilshodiskandarov7144 3 жыл бұрын
Katta Rahmat. Bizga juda foydali bo'ldi.
@blackzero4703
@blackzero4703 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance and time between two locations
@user-gz7lj7jw7r
@user-gz7lj7jw7r 3 жыл бұрын
what's the answer?
@blackzero4703
@blackzero4703 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance and time between two locations
@blackzero4703
@blackzero4703 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance and time between two locations
@game_tour
@game_tour 2 жыл бұрын
location1.distanceTo(location2); this returns distance in meters between two locations
@blackzero4703
@blackzero4703 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance and time between two locations
@techmirrors5143
@techmirrors5143 3 жыл бұрын
stackoverflow.com/questions/1502590/calculate-distance-between-two-points-in-google-maps-v3
@blackzero4703
@blackzero4703 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance and time between two locations
@blackzero4703
@blackzero4703 4 жыл бұрын
thank you for this video. I have a problem. How can I learn the distance and time between two locations
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 111 МЛН
哈莉奎因以为小丑不爱她了#joker #cosplay #Harriet Quinn
00:22
佐助与鸣人
Рет қаралды 8 МЛН
Google Maps Direction Route - Draw Route Between 2 Points
20:00
Coding Technyks
Рет қаралды 6 М.
Draw route between two locations in Android Studio - Google Maps
16:42
The Coders Integrity
Рет қаралды 20 М.
Android Google Maps with Jetpack Compose 2023
28:15
CodingWithMitch
Рет қаралды 19 М.
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,9 МЛН
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 65 МЛН