Draw route between two locations in Android - Google Maps Directions API

  Рет қаралды 165,028

The Code City

The Code City

Күн бұрын

Пікірлер
@sudeep7777777
@sudeep7777777 5 жыл бұрын
lol felt kind of happy seeing nepali's tutorial.. good job bro
@montshojosephmotsumi7762
@montshojosephmotsumi7762 2 жыл бұрын
Love this!! it worked sending love from South Africa
@medjl6083
@medjl6083 2 жыл бұрын
Good job bro, congratulation from Tunisia
@joshuaadriaanse699
@joshuaadriaanse699 5 жыл бұрын
You are amazing. Thank you. Passing my assignment thanks to this!
@sireshpillay7363
@sireshpillay7363 4 жыл бұрын
Absolutely great tutorial .. works 100% .. also appreciate the key board short cut hints as well !!! Great job looking forward to using more of your tutorials ... Many many thanks ... Easy to understand ... simple... concise coding! "No error, No Fun. Gotta fix dem errors mahn!" -VS
@parkjiji6701
@parkjiji6701 4 жыл бұрын
please it it work with youuu !?
@sireshpillay7363
@sireshpillay7363 4 жыл бұрын
@@parkjiji6701 yes it did
@parkjiji6701
@parkjiji6701 4 жыл бұрын
@@sireshpillay7363 can you please help me with it !
@sireshpillay7363
@sireshpillay7363 4 жыл бұрын
@@parkjiji6701 yes sure ....
@parkjiji6701
@parkjiji6701 4 жыл бұрын
@@sireshpillay7363 this is my facebook , send me a msg : Mariya Kerfati
@LucasFilmtDoor
@LucasFilmtDoor 4 жыл бұрын
I still have to test this myself, but this looks very promising and helpful for something I want to do in my app. The code is very clean and easy to understand. Edit: I'm not authorized to use this specific google api. That's too bad. I still agree to the statement I made earlier. It's a good tutorial.
@DanaiKamvoussiora
@DanaiKamvoussiora 4 жыл бұрын
Maybe you have restricted the api key you used to just one API function. Or maybe you haven't enabled the Directions API on your account.
@LucasFilmtDoor
@LucasFilmtDoor 4 жыл бұрын
@@DanaiKamvoussiora I was indeed using it for something else already (the location of the device), but my edited part was what I made up from the error notifications and the support on Google API's.
@sau3334
@sau3334 4 жыл бұрын
Nice work man
@TheCodeCity
@TheCodeCity 4 жыл бұрын
Thank you
@sekont15
@sekont15 5 жыл бұрын
Thank you so much. This is a well job. I really appreciate, that you share it.
@TheCodeCity
@TheCodeCity 5 жыл бұрын
You're welcome! :)
@abishekarjun3070
@abishekarjun3070 4 жыл бұрын
@Mahabooda Shaik yes
@techchiploop6778
@techchiploop6778 2 жыл бұрын
Great job dude.
@TheCodeCity
@TheCodeCity 2 жыл бұрын
Thank you!
@hurairamuzafar7418
@hurairamuzafar7418 4 жыл бұрын
thanks dude really appriceate your work
@god3254835
@god3254835 3 жыл бұрын
does it well work?
@god3254835
@god3254835 3 жыл бұрын
it's not work
@TheDarKneSsWizZ
@TheDarKneSsWizZ 5 жыл бұрын
Oh god, thank you SO MUCH! That's perfect! You are my savior!
@TheCodeCity
@TheCodeCity 5 жыл бұрын
Happy to help!
@calamitty9667
@calamitty9667 2 жыл бұрын
I dont know if you can read this but when following your video at 4:00 mark when i am typing the " btnGetDirection = findViewById(R.id.btnGetDirection)" the btnGetDirection is showing error after the R.id part . what to do about this? this is the only tutorial that i see that matches on what i need to do with my app thank you if you can reply.
@zoehltsen83
@zoehltsen83 6 жыл бұрын
Hey man, this is a great video! I really appreciate the amount of time and research you put into these videos, not knowing if people on the Internet will appreciate them. But I for one, found this a lifesaver. Cheers mate :)
@TheCodeCity
@TheCodeCity 6 жыл бұрын
Thank you very much! :)
@simeonmarkoski278
@simeonmarkoski278 5 жыл бұрын
How did you make it happen?
@shriyapandya9597
@shriyapandya9597 5 жыл бұрын
hello .. can you answer? How to start car animation along with polyline when driver start the trip?
@motazlafi2683
@motazlafi2683 4 жыл бұрын
me to
@PrabhaRaani9
@PrabhaRaani9 6 жыл бұрын
Thank you so much! It really helped me a lot.
@XecoTlah
@XecoTlah 5 жыл бұрын
Excellent tutorial
@ushameghana6337
@ushameghana6337 4 жыл бұрын
Hi the video is good but the line is not displaying on the map between two points. Can u pls help me in solving these issue
@JXHNDRX
@JXHNDRX 3 жыл бұрын
did you get it?
@jasimchouhan4784
@jasimchouhan4784 2 жыл бұрын
Thank you very much
@prakharagrawal6374
@prakharagrawal6374 3 жыл бұрын
it shows me request denied and you must enable billing at google clouds api
@syedmuhammad370
@syedmuhammad370 5 жыл бұрын
Tell me something about Fetch URL please?
@TheCodeCity
@TheCodeCity 4 жыл бұрын
Check the description, you can find the project in github
@abishekarjun3070
@abishekarjun3070 4 жыл бұрын
I am getting the markers properly but not the route
@addykulkarni
@addykulkarni 4 жыл бұрын
Hey , when i ran the code given in the github repo, i was able to run the app but wasnt able to see the map
@DanaiKamvoussiora
@DanaiKamvoussiora 4 жыл бұрын
That's because his API key that was used for this code is probably expired. You need to get a new one for yourself
@criticalthinking2019
@criticalthinking2019 3 жыл бұрын
Iknow its long time , but i was using this tutorial and am getting error "android.app.Application cannot be cast to com.namuleri.collector.TaskLoadedCallback"...would you mind to assist?
@gopaljain2951
@gopaljain2951 5 жыл бұрын
Thanks it works for me.
@pointfeIIa
@pointfeIIa 4 жыл бұрын
why does my polyline not show? there are no errors, i have even enabled billing via an paypal account but to no avail
@pointfeIIa
@pointfeIIa 3 жыл бұрын
uhhh i found the reason why, paypal account does not work, you have to enable billing via a card. dont worry if you are doing it for a project like me then you most likely wont use it enough to get actually billed
@tiktok-funny-time
@tiktok-funny-time 3 жыл бұрын
Get Location button is not connected to any event bro right? Because it is not initialize in any onClickListener
@adenitireedward2893
@adenitireedward2893 5 жыл бұрын
The line is not showing on the map when i turn on the direction api,but when i check the direction api analysis its shows that i made a request..Please any help because i need it for my project defence that is slated on tuesday.
@TheCodeCity
@TheCodeCity 5 жыл бұрын
Perhaps you need to enable the API, Google needs you to enter credit card info for enabling the API now a days. Maybe that is the issue.
@batuhansubasi
@batuhansubasi 5 жыл бұрын
did u solve the problem?
@Voltaic_alp
@Voltaic_alp 2 жыл бұрын
Can you add Waypoints to this route by modifying the getUrl method?
@leandroteixeira2868
@leandroteixeira2868 4 жыл бұрын
i dont have the fechUrl class so i cant execute the url, can you tell me another way to do that or how that class works?
@TheCodeCity
@TheCodeCity 4 жыл бұрын
You can download the classes from github, check description
@bijenduwal4758
@bijenduwal4758 5 жыл бұрын
nice watching nepali android map tutorial...
@RAHULKUMAR-dm9cc
@RAHULKUMAR-dm9cc 4 жыл бұрын
Do I need to pay for enabling billing
@TheCodeCity
@TheCodeCity 4 жыл бұрын
No
@RAHULKUMAR-dm9cc
@RAHULKUMAR-dm9cc 4 жыл бұрын
Ok..then without credit card can I enable billing
@WhyAndWhatIf-Questions
@WhyAndWhatIf-Questions 3 жыл бұрын
Hey, have a question here. So I have to pay Google for the Direction API, right?
@TheCodeCity
@TheCodeCity 3 жыл бұрын
Yes
@algerowalid
@algerowalid 5 жыл бұрын
Thank You man
@TheCodeCity
@TheCodeCity 5 жыл бұрын
You're welcome :)
@daphnevitalis2083
@daphnevitalis2083 4 жыл бұрын
Hii. I cannot seem to use the TaskLoadedCallBack function ..the only thing that came out is AsyncLoaded. Is it the same thing and still can be used? Thanks
@techshortstamil5573
@techshortstamil5573 4 жыл бұрын
implement TaskLoadedCallBack function in the main class
@daphnevitalis2083
@daphnevitalis2083 4 жыл бұрын
@@techshortstamil5573 ohh ok will try it out thanks
@ericcannon862
@ericcannon862 5 жыл бұрын
Is it possible to query if a user is on this route? For example if I predefine two markers and create a route from one to the other, then if a user enters this road they will receive a notification?
@aristornai
@aristornai 6 жыл бұрын
Hi..how can we draw routes for multiples directions based on color?
@TheCodeCity
@TheCodeCity 5 жыл бұрын
You can add multiple colors for multiple paths.
@sudeyuksek8379
@sudeyuksek8379 3 жыл бұрын
sir can I apply shortest path algorithms and graphs to this tutorial? I am beginner.For my data structures lesson I have to make android app with map using graphs and dijekstra.
@TheCodeCity
@TheCodeCity 3 жыл бұрын
Yes you can
@hafsa5611
@hafsa5611 3 жыл бұрын
i m working on the same issue please Did you manage that ?
@sudeyuksek8379
@sudeyuksek8379 3 жыл бұрын
@@hafsa5611 I guess google maps v2 doesnt let you use graphs but we did something different. we managed to get markerPoints on the way (every turn in the route) and then with that markers we created a path for dijekstra algorithm. we have reached very close mileage values comparing with google maps automatic shortest route.
@hafsa5611
@hafsa5611 3 жыл бұрын
@@sudeyuksek8379 yes I am doing the same project as you, I found some difficulties in the implementation of the algorithm dijkstra on google maps, I want a dynamic implementation that allows me to implement each new graph directly, did you get my point?
@sumeyraackel9241
@sumeyraackel9241 2 жыл бұрын
merhaba, dijkstrayı bu koda mı eklediniz?
@jkwebersland5716
@jkwebersland5716 4 жыл бұрын
Perfect..Thanks
@TheCodeCity
@TheCodeCity 4 жыл бұрын
You're welcome :)
@pavassrivastava3323
@pavassrivastava3323 4 жыл бұрын
Is this the shortest route between two points?
@mohamedatef8589
@mohamedatef8589 6 жыл бұрын
how can i draw route from device location to known location (constant)
@sulmanyousaf6545
@sulmanyousaf6545 5 жыл бұрын
i need it did you get that?
@Adarsh_Anurag
@Adarsh_Anurag 5 жыл бұрын
//declare this private FusedLocationProviderClient mFusedLocationProviderClient; //in onCreate of your activity // Construct a FusedLocationProviderClient. mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this); private void getDeviceLocation() { /* * Get the best and most recent location of the device, which may be null in rare * cases when a location is not available. */ try { if (mLocationPermissionGranted)//variable that stores the status if location permission is granted or not { Task locationResult = mFusedLocationProviderClient.getLastLocation(); locationResult.addOnCompleteListener(this, new OnCompleteListener() { @Override public void onComplete(@NonNull Task task) { if (task.isSuccessful()) { // Set the map's camera position to the current location of the device. mLastKnownLocation = task.getResult(); mMap.moveCamera(CameraUpdateFactory.newLatLngZoom( new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()), DEFAULT_ZOOM)); //add a marker if required } else { Log.d(TAG, "Current location is null. Using defaults."); Log.e(TAG, "Exception: %s", task.getException()); mMap.moveCamera(CameraUpdateFactory .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM)); } } }); } } catch (SecurityException e) { Log.e("Exception: %s", e.getMessage()); } }
@Adarsh_Anurag
@Adarsh_Anurag 5 жыл бұрын
@@sulmanyousaf6545 , see my reply to mohamed atef question for answer
@marvinmagana5850
@marvinmagana5850 4 жыл бұрын
Thank you!!!
@vivekyadav-go2pu
@vivekyadav-go2pu 6 жыл бұрын
getting this error::This IP, site or mobile application is not authorized to use this API key. Request received from IP address 112.196.62.4, with empty referer", "routes" : [], "status" : "REQUEST_DENIED"}
@omerucansu2569
@omerucansu2569 6 жыл бұрын
I think it was a paid service
@ahsanarif5989
@ahsanarif5989 5 жыл бұрын
You need to generate your own API key.
@batuhansubasi
@batuhansubasi 5 жыл бұрын
did u solve the problem?
@monkeywings
@monkeywings 5 жыл бұрын
How do I make it give a direction mode of walking?
@cloudherry
@cloudherry 5 жыл бұрын
May I ask after I pass in my google api key which enable all map function already, but when I click the Get Direction there show me "You must enable Billing on the Google Cloud Project at console.cloud.google.com
@rumanmulla138
@rumanmulla138 4 жыл бұрын
lunlun herry google has restricted directions api to 1 req per day. So get a free trial by adding your billing info and you are good to go.
@ahsanarif5989
@ahsanarif5989 5 жыл бұрын
I have followed the whole tutorial but I am not being able to see the markers and their respective route. Kindly help I have to meet my deadline.
@vedantghate92
@vedantghate92 4 жыл бұрын
i alsoo suffer from this problem
@abdulmughees1082
@abdulmughees1082 4 жыл бұрын
it shows functions are depricated
@ayrtonbalonga9405
@ayrtonbalonga9405 4 жыл бұрын
i like you very, it's helped me so much
@TheCodeCity
@TheCodeCity 4 жыл бұрын
I'm glad it helped 😁
@navneetprakash933
@navneetprakash933 4 жыл бұрын
Runs fine but on clicking get directions polyline isn't showing up
@TheCodeCity
@TheCodeCity 4 жыл бұрын
Maybe some things have, changed, I'll have to check.
@parkjiji6701
@parkjiji6701 4 жыл бұрын
yess the same problem with me , but when i click on get Direction , it doesn't do nothing :(
@navneetprakash933
@navneetprakash933 4 жыл бұрын
@@parkjiji6701 solution for the polyline curve you need to have your api enabled some features such as distance api and geocoding etc
@parkjiji6701
@parkjiji6701 4 жыл бұрын
@@navneetprakash933 yes i enable them , but nothing change :( , anyway thanks for your reponse
@parkjiji6701
@parkjiji6701 4 жыл бұрын
@@navneetprakash933 or maybe i have to pay to get a working key for direction !!
@osamamohsen3993
@osamamohsen3993 5 жыл бұрын
Google have set quota for directions API , any idea to draw route between 2 points without calculate traffic , meaning offline map
@siminam.michile4648
@siminam.michile4648 5 жыл бұрын
try this video but watch out that there is some error i try to figure out, it does not display the polyline and also says that second marker (destination) is not found. Still, maybe you can get some inspiration: kzbin.info/www/bejne/oJiUpqWqaKt6ebs
@darkstain054
@darkstain054 4 жыл бұрын
do you guys activate billing accounts for your projects?
@TheCodeCity
@TheCodeCity 4 жыл бұрын
No, billing was not activated at the time of building this.
@timothyjohnson3377
@timothyjohnson3377 5 жыл бұрын
This is incredibly helpful, thank you.
@birdunyakod3867
@birdunyakod3867 4 жыл бұрын
how can i add alternative roads can you help me please
@vu111
@vu111 3 жыл бұрын
Very helpful, Rhank u , but please sir , how can we add destinations or stops in a single Trip
@TheCodeCity
@TheCodeCity 3 жыл бұрын
You can just add markers on required lat, lang and set them as stops on your end, not required to do anything with Google Maps API
@vu111
@vu111 3 жыл бұрын
​@@TheCodeCity Sir, I tried adding another fetchUrl between place 2 and place3 below fetchUrl between place 1 and place 2, and when I run the program it just shows the latest fetchUrl, how can I trace all the fetchUrl in a correct way ??
@onix1501
@onix1501 2 жыл бұрын
@@vu111 hey, did you find a solution? I really need it and I can't find one
@naiffarhan4603
@naiffarhan4603 3 жыл бұрын
how can i draw route from mcurrent location/ device location to destination?
@wickedsnuk3812
@wickedsnuk3812 5 жыл бұрын
what if we want to make a path between more than 2 locations ?
@hafsa5611
@hafsa5611 3 жыл бұрын
Please did you find the solution?
@lifelane7458
@lifelane7458 3 жыл бұрын
and how do i get the latitudes and longitudes of the route which you just made between two points?
@TheCodeCity
@TheCodeCity 3 жыл бұрын
You need to get the latitude and longitude of which point?
@lifelane7458
@lifelane7458 3 жыл бұрын
@@TheCodeCity the route which you created between point A to B , so how do i get all the lats and longs which lies in the route created ? Like the route which was highlighted with the blue lines all lats and longs of blue line route?
@WhyAndWhatIf-Questions
@WhyAndWhatIf-Questions 3 жыл бұрын
If user is moving, is the route shorter? I mean, it is changed when user is moving.
@TheCodeCity
@TheCodeCity 3 жыл бұрын
You'll have to recalculate the path
@saiteja9879
@saiteja9879 Жыл бұрын
can you please do video on turn to turn navigation
@TheCodeCity
@TheCodeCity Жыл бұрын
Ok sure
@isakayproject9643
@isakayproject9643 3 жыл бұрын
how do you create the direction helpers? please help me
@TheCodeCity
@TheCodeCity 3 жыл бұрын
Check the description for the github link to files
@jparrax1
@jparrax1 4 жыл бұрын
Sweet as!
@TheCodeCity
@TheCodeCity 4 жыл бұрын
Yeaaahhhhh!
@wafajavaid5049
@wafajavaid5049 5 жыл бұрын
How did you set the colour and width of the polyline???
@Adarsh_Anurag
@Adarsh_Anurag 5 жыл бұрын
go to PointsParser.java and change this lines (80 and 81 in his github code):- lineOptions.width(20); lineOptions.color(Color.BLUE);
@nirmalpatel7121
@nirmalpatel7121 5 жыл бұрын
This worked one time after that it stopped showing path because google have set free quota directions API limit to 1 per day. This works 1 time daily. You have to buy to make it work every time.
@sayedaliyahyaazhar4218
@sayedaliyahyaazhar4218 4 жыл бұрын
everything is working fine but lines are not appearing???.... what's the problem
@diyandbestoutofwastechanne4654
@diyandbestoutofwastechanne4654 5 жыл бұрын
Hi, I am getting this error - java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference How to solve it??
@rumanmulla138
@rumanmulla138 4 жыл бұрын
google has restricted directions api to 1 req per day. So get a free trial by adding your billing info and you are good to go.
@prashantchopkar3912
@prashantchopkar3912 4 жыл бұрын
Sir I want your help
@unknown-vq8so
@unknown-vq8so 2 жыл бұрын
how about draw route from current location to marker?
@mohammadhattabtm
@mohammadhattabtm 5 жыл бұрын
good tutorial but unfortunately it's not working when I press get directions
@mohammadhattabtm
@mohammadhattabtm 4 жыл бұрын
It works now by save lantlang in sharedpreferences then pass them as parameters
@raslench7034
@raslench7034 4 жыл бұрын
@@mohammadhattabtm how did you do this. could you share your code?
@lyawileh.a8741
@lyawileh.a8741 4 жыл бұрын
Very helpful, may you do same tutorial in Kotlin language.
@mkttoonz6828
@mkttoonz6828 Жыл бұрын
Thanks
@saurabh8587
@saurabh8587 Жыл бұрын
did you use it? it is working?
@dx31900
@dx31900 4 жыл бұрын
is direction api is free in android apps?
@nnamdijohnpaulihechu1395
@nnamdijohnpaulihechu1395 4 жыл бұрын
How can I do it on website (php)
@isakayproject9643
@isakayproject9643 3 жыл бұрын
where can i get dataparser file?
@tushartripathi5213
@tushartripathi5213 5 жыл бұрын
what Is this fetch url class thing. Completely confused !!!
@DanaiKamvoussiora
@DanaiKamvoussiora 4 жыл бұрын
It's in the code he provides on his git. He said that he wrote the helpers before and that he isn't going to explain the details that happen on the background in this video
@prashantchopkar3912
@prashantchopkar3912 4 жыл бұрын
मुझे अपने कॅम्पस के लिये बहोत सरी location ke liye yah app banana hai to kaise banau please help me
@-NayanjyotiPegu
@-NayanjyotiPegu 4 жыл бұрын
Get fragment manager is deprecated what to do
@KamrujjamanJoy
@KamrujjamanJoy 5 жыл бұрын
This is not working for me. not show the direction...... can you help me please..
@daisylenebinondo241
@daisylenebinondo241 5 жыл бұрын
Thankyou for this, it works. But can u pls answer me why the lines or path is not appear??? This is our school project plsss need ur help or someone help me :(
@JXHNDRX
@JXHNDRX 3 жыл бұрын
Did you get it?
@jinhonghew9222
@jinhonghew9222 5 жыл бұрын
How to solve Cannot resolve symbol "google_maps_key" ??
@simeonmarkoski278
@simeonmarkoski278 5 жыл бұрын
Did you find the problem?
@shas9
@shas9 5 жыл бұрын
Generate a key from Google Cloud Platform. And add a xml file in a layout called google_map_api.xml And add a string named google_map_api where you will add your api key. Remember to enable the direction api.
@habboholoful
@habboholoful 5 жыл бұрын
@@shas9 Thank you :D
@CodeCraft101
@CodeCraft101 5 жыл бұрын
Good your doing a wonderful job, Keep it up, Just speak a little slowly :-)
@adancontreras2671
@adancontreras2671 4 жыл бұрын
not working !! locations are empty
@bojiastilla3832
@bojiastilla3832 5 жыл бұрын
Hi, polyline seems not working. It wont show. Can u help?
@ayushanandsrivastava3563
@ayushanandsrivastava3563 5 жыл бұрын
please search for dependencies related to it & then write Polyline the Alt+Enter. if it worked or not plz let me know. I am also working on same project.
@bojiastilla3832
@bojiastilla3832 5 жыл бұрын
Still not working, i even enable the directions.
@ayushanandsrivastava3563
@ayushanandsrivastava3563 5 жыл бұрын
@@bojiastilla3832 ohh did u find any solution..actually i found smthng saying that it has now been paid, but i m not sure
@gulafshapraveen3143
@gulafshapraveen3143 5 жыл бұрын
my getDirection button is not working...although i run it with the same code with user requirement two locations..but i did't see any line drawn between them.
@gopaljain2951
@gopaljain2951 5 жыл бұрын
Same problems comes in my case. then i enable directions Api and road api from google developer console and it works for me.and
@sahanavalli2213
@sahanavalli2213 5 жыл бұрын
Sir getting error in pointer Parser.java that is int java.util.list.size() is on null object reference
@kajalarya3796
@kajalarya3796 3 жыл бұрын
Hello I got the same error.plz tell me how to resolve??
@pornjirasripraphod5218
@pornjirasripraphod5218 3 жыл бұрын
​@@kajalarya3796 Can you solve this problem??
@skullzor6049
@skullzor6049 5 жыл бұрын
I have a problem the line does not appear between the two locations
@JXHNDRX
@JXHNDRX 3 жыл бұрын
did you get it?
@reardeltoit4644
@reardeltoit4644 6 жыл бұрын
where is the "Polyline"s ? just one route showing in the end of videos test.
@TheCodeCity
@TheCodeCity 6 жыл бұрын
That is called polyline
@harvyabo3381
@harvyabo3381 2 жыл бұрын
how to fix red of new FetchURL
@simeonmarkoski278
@simeonmarkoski278 5 жыл бұрын
I have enabled Directions API but i can't still not see the blue line... Please help
@ItsMePP
@ItsMePP 5 жыл бұрын
My app collapse as soon as it is launched..there is no error. My main activity class is also in right place.then What could be the reason🤔.. can anybody help?
@zainabkhan9558
@zainabkhan9558 6 жыл бұрын
When I create the map activity in my project of android studio this error occurs in xml activity of google map. But it happens to only one project not in every project of my Android studio. Please help me. Error is given below: Gradle tasks [:app:assembleDebug] Execution failed for task ':app:processDebugGoogleServices' >Please fix the version conflict either by updating the version of the google-service plugin ( information about the latest version at bintray.com/android/android-tools/com.google.gms.google.service/) or updating the version of com.google.android.gms to 10.0.1. BUILD FAILED Total time: 27.831 secs 1 error 0 warnings See complete output in console
@selinsayn5214
@selinsayn5214 3 жыл бұрын
Is the drawn route the shortest path?
@TheCodeCity
@TheCodeCity 3 жыл бұрын
Not necessarily.
@selinsayn5214
@selinsayn5214 3 жыл бұрын
@@TheCodeCity we want to draw shortest path between two locations what should we do?
@vamsireddy7560
@vamsireddy7560 4 жыл бұрын
Where is FetrchURL asymc class u didnt write that class but u executed how
@DanaiKamvoussiora
@DanaiKamvoussiora 4 жыл бұрын
It's in the code he provides on his git. He said that he wrote the helpers before and that he isn't going to explain the details that happen on the background in this video
@kritipchakrabarti3929
@kritipchakrabarti3929 4 жыл бұрын
not showing any polyline bro. I hav done everything u said
@JXHNDRX
@JXHNDRX 3 жыл бұрын
did you get it?
@umarmeo7376
@umarmeo7376 5 жыл бұрын
@The Code City plz help us we all are getting same error blue line not showing and searched on it i got the answer that use server key not simple api key what do you say plz clear the point....?
@ayushanandsrivastava3563
@ayushanandsrivastava3563 5 жыл бұрын
go to the link that creates api key, generate the key and edit is and set it for ip address(web servers) and click save. Also go to libraries and search for direction and enable it. if it worked or not plz let me know. I am also working on same project.
@zoehltsen83
@zoehltsen83 5 жыл бұрын
@@ayushanandsrivastava3563 you are a genius sir, I enabled directions for my API key and it worked. Thanks much :) For those wondering how to enable it, create a project in Google Cloud Platform. Go to API & Services (use the search bar if needed) and find the Directions API. Click on it and click enable. You should also have enabled it with Google Play Android Developer
@bojiastilla3832
@bojiastilla3832 5 жыл бұрын
@@zoehltsen83 Hi, thanks for the info. Where can i enable the google play android dev?
@zoehltsen83
@zoehltsen83 5 жыл бұрын
@@bojiastilla3832 It should be under the "libraries" under "API & Services" scroll down for search for it using the search bar
@bojiastilla3832
@bojiastilla3832 5 жыл бұрын
@@zoehltsen83 IT WORKED! Thanks a lot sir. Ive been working for a week to make it work. Ps: im a student. Thanks a lot sir
@yadavramkesh9
@yadavramkesh9 4 жыл бұрын
The Answer is very good man, but here a minor bug i have found, That is , polyline is not creating route exact from starting marker , their some margin from marker and starting of polyline, could you tel me why this is happening ?
@TheCodeCity
@TheCodeCity 4 жыл бұрын
Yo might have set the mode to driving and there might not be a driving road to the exact point.
@yadavramkesh9
@yadavramkesh9 4 жыл бұрын
@@TheCodeCity yes, you are right, so what should i need to do ? I also need time and fare and cost calculation in app, that's why i used driving mode. Let me suggest something better. Thanks.
@TheCodeCity
@TheCodeCity 4 жыл бұрын
@@yadavramkesh9 If a car cannot be driven to a place, Google will not display polyline to that place in driving mode. You'll have to calculate fare for only the path where the car can go according to Google.
@yadavramkesh9
@yadavramkesh9 4 жыл бұрын
@@TheCodeCity thank you for replying, i think you have not got my point, my point is , if i want to create route from eaxctly from marker which is not placed to a road, then should i change my mode from driving to walk ?
@TheCodeCity
@TheCodeCity 4 жыл бұрын
@@yadavramkesh9 Yes
@samjenverabulencia6838
@samjenverabulencia6838 6 жыл бұрын
Hi bro. When i click get directions the blue line does not show
@TheCodeCity
@TheCodeCity 6 жыл бұрын
Download the code from the link in the description & replace the API key with your key and try to run the app. Check your log to see what might be wrong.
@samjenverabulencia6838
@samjenverabulencia6838 6 жыл бұрын
@@TheCodeCity I already downloaded the code and i already have my own API key but still it doesn't show. this is the error bro 11-18 16:45:12.224 2573-2588/? W/MessageQueue: Handler (android.telephony.PhoneStateListener$1) {2cb2ed9} sending message to a Handler on a dead thread java.lang.IllegalStateException: Handler (android.telephony.PhoneStateListener$1) {2cb2ed9} sending message to a Handler on a dead thread at android.os.MessageQueue.enqueueMessage(MessageQueue.java:543) at android.os.Handler.enqueueMessage(Handler.java:631) at android.os.Handler.sendMessageAtTime(Handler.java:600) at android.os.Handler.sendMessageDelayed(Handler.java:570) at android.os.Handler.sendMessage(Handler.java:507) at android.os.Message.sendToTarget(Message.java:416) at android.telephony.PhoneStateListener$2.onSignalStrengthsChanged(PhoneStateListener.java:573) at com.android.internal.telephony.IPhoneStateListener$Stub.onTransact(IPhoneStateListener.java:133) at android.os.Binder.execTransact(Binder.java:453)
@parkyardapplication3062
@parkyardapplication3062 6 жыл бұрын
@@samjenverabulencia6838 cuz you nnoooooobbbbb!
@jhonnycave7893
@jhonnycave7893 6 жыл бұрын
@@samjenverabulencia6838 I have same problem
@zoranjankovic3363
@zoranjankovic3363 6 жыл бұрын
me too
@abdulrahmanmostafa9550
@abdulrahmanmostafa9550 5 жыл бұрын
thank you so much I want know storing my direction in firebase
@syedhissaan1654
@syedhissaan1654 5 жыл бұрын
in my point of view it's not a good idea storing directions in firebase . it would be more convenient if you store only the latitude and longitudes in firebase database, and load on the other device using those LatLong coordinates .
@abdulrahmanmostafa9550
@abdulrahmanmostafa9550 5 жыл бұрын
How to find more than one way between two points
@jakasuryana8878
@jakasuryana8878 5 жыл бұрын
the polyline doesnt work for me, can u help me man?
@JXHNDRX
@JXHNDRX 3 жыл бұрын
did you get it?
@邱俊瑋-j7d
@邱俊瑋-j7d 4 жыл бұрын
hi! could you make a tutorial about DirectionHelpers ?? thanks!!!!!!!!!!! i have read the code , but cant really understand how they work
@techhack6185
@techhack6185 4 жыл бұрын
Where is FetchURL
Get Google Maps API Key for Android - Live Process
6:25
The Code City
Рет қаралды 4,6 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Google Map tutorial | Flutter
14:43
CodeX
Рет қаралды 57 М.
Flutter Google Map With Live Location Tracking
9:08
The Flutter Way
Рет қаралды 285 М.
How to implement Google Maps in your Android App.
8:03
tutorialsEU
Рет қаралды 143 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 148 М.
FlutterFlow | Google Maps Search and Nearby Places
10:02
Steven NoCode
Рет қаралды 25 М.
Location Autosuggestions TextView - [Android Google Maps Course]
13:28
CodingWithMitch
Рет қаралды 96 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН