Тёмный

Google Maps Tutorial : Part 2 (Current location & Search Address) 

Tech Academy
Подписаться 32 тыс.
Просмотров 278 тыс.
50% 1

Опубликовано:

 

25 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 184   
@TechAcademy8
@TechAcademy8 9 лет назад
In the last tutorial, we created a google maps app which is showing a fixed location near nigeria. In this part, I will show you how to show your current location and you will also learn how to search for a particular address or place. #android #androiddev #developer #googlemaps #maps #learn #tutorial
@chetanpraneeth4835
@chetanpraneeth4835 9 лет назад
Tech Academy man good hav these tutorials Need more tutorials on google maps like path from source and destination, suggestions etc
@TechAcademy8
@TechAcademy8 9 лет назад
Yes, I will make more Google Map tutorials after I complete my current MySQL + PHP series. A lot of people have requested me to do more tutorials on Google Maps. So I will surely do it.
@chetanpraneeth4835
@chetanpraneeth4835 9 лет назад
Tech Academy Mam your tutorials are so good. please dont ever stop these. And also provide easy way of json parsing in list view (custom and general), text view, etc. Also bottom tab bar(options like-home,music,videos,events,more with icons) in which for each selection of icon ,the content should be display on top. refer this(www.telerik.com/clientsfiles/415597_tabstrip-issue.jpg?sfvrsn=0).
@sbaloch9851
@sbaloch9851 8 лет назад
+Tech Academy hello! my app can't find the current location in my emulator although i have installed all the packages which is required by the emulator and it works perfectly fine, it does show the map but not the current location and even to try it more i installed the app in my phone and it still doesn't work. i have followed each step of yours kindly tell me the solution.
@sbaloch9851
@sbaloch9851 8 лет назад
+Tech Academy please try to reply because its part of my project so i badly need the solution.
@bboyrd01
@bboyrd01 8 лет назад
You are a fantastic teacher, the spontaneity and skills. This thumbs up is for your quality of teaching.
@kiranezhava9003
@kiranezhava9003 8 лет назад
ty mam.. your first video on google map helped me complete my sample map and here am i again watching your tutorials. They are so easy and amazing. You are great, ty again :)
@vipul51
@vipul51 7 лет назад
Good starting point for someone starting to read Google Maps API on Android.
@girrardperregeaux1833
@girrardperregeaux1833 8 лет назад
Very clear and simple explanation. You go gurllll!!!!
@joeburns88
@joeburns88 9 лет назад
Good tutorial. She took it step by step and worked fine on my device. Thanks very much!
@mazharulislam5187
@mazharulislam5187 9 лет назад
That's superb.... Really a good one...
@Razatii
@Razatii 9 лет назад
Please Continue Map tutorial I find them so easy and I thank you for making them
@hindureddy4466
@hindureddy4466 6 лет назад
Thank you madam your videos are very clear to understand and we created successfully a google maps
@AmanAgarwal8050
@AmanAgarwal8050 8 лет назад
Very nice video ..Learned a lot
@aravindaby4152
@aravindaby4152 8 лет назад
please upload a tutorial on how to draw driving routes between current location and destination
@vaibhavnadgonde4397
@vaibhavnadgonde4397 8 лет назад
Thank you for such a informative tutorial, I am new to android but after this tutorial I think I will do it :) Keep rocking
@jhj9542
@jhj9542 8 лет назад
Thank you for your tutorial!!! It was very helpful :)
@saylasgrivz
@saylasgrivz 6 лет назад
Happy Birthday Arohi!
@anniehe8616
@anniehe8616 9 лет назад
I really learned something ! Thank you so much!
@jaydeepshrivastava5103
@jaydeepshrivastava5103 7 лет назад
Thank you So Much For Such As Best Explaination. Keep it Up. Very Nice
@mohankrishna6185
@mohankrishna6185 7 лет назад
I found an error "cannot find symbol method getMap()",how to resolve this?
@samanriaz9704
@samanriaz9704 7 лет назад
thankyou mam your tutorial helped me alot in making my semester project , thankyou sooooo much mam :*
@AhsanKhan5925
@AhsanKhan5925 8 лет назад
how we can use by default location as user current location instead of a fix location.
@funkupgamer5364
@funkupgamer5364 8 лет назад
must say!!! great video very helpful :)
@iProCombo
@iProCombo 7 лет назад
Hi! I'm trying to follow your tutorials but most of the code is now deprecated. May you please give me an alternative to mMap.setMyLocationEnabled(true); ? As I am getting this error: call requires permissions that may be rejected by the user
@TechDocWorld
@TechDocWorld 8 лет назад
thank you priya for this beautiful presentation it helps me a lot
@shravyapabba7763
@shravyapabba7763 8 лет назад
Thank you So much....it helped me a lot in my project :)
@dorondavid4698
@dorondavid4698 7 лет назад
Thanks dude! Helpful vid!
@nediphylactou1822
@nediphylactou1822 8 лет назад
Τhank you very much for the help.Your tutorial is so good.
@azadbingi5739
@azadbingi5739 7 лет назад
ur great this is awesome and i love it
@md.saifulislambhuiyan813
@md.saifulislambhuiyan813 7 лет назад
Thanks & Happy birthday arohi! :D
@umutdonmez2707
@umutdonmez2707 8 лет назад
Ty for this video and code :D I tried thank u so much again :D
@poojabhogle4405
@poojabhogle4405 8 лет назад
Thank u it is very very helpful but can u please make the videos onroutes between two places, near by location and location based alarm system
@MarathiDigital
@MarathiDigital 9 лет назад
१०.२० ला मराठी आले.."त्यानंतर"..मस्त..!!
@harigawkar9932
@harigawkar9932 8 лет назад
Thanks for this tutorial.if i want to add current location in fragment then how can i implement?
@sagarkhan95
@sagarkhan95 8 лет назад
Very nice tutorial....only one correction...How can you perform search when u have't added listener on your button.?
@nguyentrongtam5204
@nguyentrongtam5204 9 лет назад
Thank you so much It is useful for me. Excuse me, How can I show all list about where I want to know when I'm typing lectures in TextView? After that I will choose one that isn't at get(0). Thanks again. Tam
@SindhuVarenya
@SindhuVarenya 9 лет назад
I implemented the code exactly as you said. But when I enter a location in the text and press search the application is closing saying unfortunately demMaps is closed.
@reshmikaadgal7634
@reshmikaadgal7634 7 лет назад
Thanks for the tutorial . But it would be better if you could upload the latest version of tutorial as some of the methods are depracated
@hindureddy4466
@hindureddy4466 6 лет назад
Can you add videos on retrofit
@ahmed-df3yg
@ahmed-df3yg 6 лет назад
Good work but how can I make text field displays Addresses depends on first letters of address so that's make it easy
@maniwalrohit601
@maniwalrohit601 7 лет назад
how google navigation turn by turn command like "turn left turn right" works and how i use it for my purpose?
@Sumeet1524
@Sumeet1524 8 лет назад
Thanks a lot ^.^ !!!! Works perfect .....
@srinivasannamachivayan8671
@srinivasannamachivayan8671 7 лет назад
Hi Tech Academy. Can you upload your latest code to get the current location of the user
@ubinullas6268
@ubinullas6268 8 лет назад
How to add navigation here in google maps..?? Expecting a quick reply from techacademy
@TheVARDHAN007
@TheVARDHAN007 8 лет назад
thank you so much can u make a tutorial that how the map latlng data can send to server by json through web service
@purplestarrz
@purplestarrz 8 лет назад
@Tech Academy Great Video. Can u do a video showing how to add the Navigation Drawer activity to the map activity
@sadhnapatidar3446
@sadhnapatidar3446 7 лет назад
plz upload the video that finds the distance between two points on Google map
@tanujgupta7182
@tanujgupta7182 8 лет назад
this code didn't find current location , rest code is working properly. help
@monikabalram770
@monikabalram770 7 лет назад
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { requestPermissions(new String[] { Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.INTERNET }, 10); } return; } add this above code before mMap.setMyLocationEnabled(true); hope this works...
@amallaltl6374
@amallaltl6374 7 лет назад
Your technology is under extinction,I can't get the current location button in my screen! But your tutorials are helpful. try to keep it updated.
@walaachehebelaine2265
@walaachehebelaine2265 4 года назад
thank you so much
@javedalam7383
@javedalam7383 7 лет назад
where do you used onSearch() method?? i am using Android Studio 2.2.3
@jimoo4
@jimoo4 9 лет назад
Hi! If I rotate my phone I lost the markers. How can I fix it?
@Suneelkumar-wf8ml
@Suneelkumar-wf8ml 7 лет назад
THANKS ALOT....
@deepsidhu1790
@deepsidhu1790 8 лет назад
hii.. when i run my app and search particular location or address it does't show me particular location it show only the country.. plz help me
@akshplanet
@akshplanet 9 лет назад
thanks for such a wonderful tutorial.... why don't you try to run app directly to your device with the help of using "google usb driver".
@TechAcademy8
@TechAcademy8 9 лет назад
Akshay Toraskar I can do that but then I will have to record it separately and it takes time. So I just use ADB for testing the app.
@sayedmasihullah6922
@sayedmasihullah6922 8 лет назад
Are you Google developer?
@officialsachinverma
@officialsachinverma 8 лет назад
how can I move camera to the my location when I tapped on that location button??
@陳貝蒂-q1j
@陳貝蒂-q1j 8 лет назад
oh i thank you so much, it's easy.
@saivishaltm7447
@saivishaltm7447 8 лет назад
I am unable to get the location which I entered.For every location I am getting marker at spain.
@redboxmuzik4301
@redboxmuzik4301 8 лет назад
Please can u do Auto complete Map video tutorial
@sonicblade2225
@sonicblade2225 6 лет назад
Hmm, I want to ask something. How that button search can work ? I found some error that called "java.lang.IllegalStateException: Could not find a method Onclick(View)", help me please.. thankyou
@yumasai
@yumasai 7 лет назад
I have a button in my app and an EditText field where people can insert a postal code. When I hit the button, the map does not updates to the location of the postalcode address. Is this because it's a postal code but I rather need to insert stuff like "White House" or something?
@n.blanco8321
@n.blanco8321 8 лет назад
hello, excellent tutorial, works for me well, but for example when I do not have internet stops and closes the application, anyone know how to fix that?
@anand10parmar
@anand10parmar 8 лет назад
you should have internet for that as you are using google API... its a back and forth fetching process using internet service.
@surabhilakhotiya7879
@surabhilakhotiya7879 6 лет назад
mam,Can you please upload a video of store locator in android (java).Add Stores from application and search them.Is it possible mam?
@hemanth6951
@hemanth6951 7 лет назад
it is possible to add beam direction for blue dot
@nguyentuankiet6195
@nguyentuankiet6195 7 лет назад
Thanks you !!!
@ASKP007
@ASKP007 6 лет назад
how to draw route between current location and pre existing marker by tapping on the marker
@mahmoudbessio4238
@mahmoudbessio4238 8 лет назад
how can i get the location address after adding the marker on it i tried to use getMylocation and it returns null
@chloekourkouna9227
@chloekourkouna9227 8 лет назад
Hello , iam trying to do the same on android studio but iam having some problems something with the SDK tools and the versions i use because i use exactly the same words with you, if you can help me somehow i would appreciate it!!! iam having a "manifest merger failed"
@neppolianvenkat2992
@neppolianvenkat2992 8 лет назад
shows error in setUpmap() method that " mMap.setMyLocationEnabled(true);". what should i do?
@benjaminlize2463
@benjaminlize2463 9 лет назад
great tutorial ... tho strange ... it seems like onSearch(View view) method is never used??? says my Android Studio, what am I doing wrong? i dont understand where you declare that function to be used or why yours works. Please enlighten me
@SindhuVarenya
@SindhuVarenya 9 лет назад
I got the same error. This happens when we dont click the button but press go on the keyboard.
@toughgamesstages4186
@toughgamesstages4186 6 лет назад
just put onClick(onSearch) where you button in the XML layout file
@oumaymajouini4087
@oumaymajouini4087 8 лет назад
I have a question can someone pliiz answer me if i uses google map application can i still make other layout to create a complete app like login and register and google map ???
@shrutisoni6605
@shrutisoni6605 8 лет назад
awesome mam...:**
@0mEal
@0mEal 9 лет назад
when i put setMyLocation() and i try in the emulator it doesn't work, why?
@jottilohano2232
@jottilohano2232 7 лет назад
When I run this code my app has unfortunately close.app is not runing plzz help me how I solve problem
@agarcia1425
@agarcia1425 8 лет назад
hi, how atitude and longitude replace with a name of city?
@iamneaz
@iamneaz 9 лет назад
please do a tutorial on reverse geocoding !
@sandiachanchal3598
@sandiachanchal3598 8 лет назад
Hey Thanks for this video. I have followed your steps but facing problem of app unfortunately stopped by clicking search button. I have wrote onSearch method out of onMapReady method.. Please help me!!
@MsWhite022
@MsWhite022 8 лет назад
+Sandia Chanchal did you found any solution?
@mohankrishna6185
@mohankrishna6185 7 лет назад
I am facing the same problem now, do you have any solution?
@jottilohano2232
@jottilohano2232 7 лет назад
MsWhite022 u found the solution??
@faizanshoukat8060
@faizanshoukat8060 6 лет назад
Same problem
@froilanvillaester9927
@froilanvillaester9927 8 лет назад
The marker of the previously searched place is retaining. Can we remove it every search ? Thanks for the tutorial by the way, its cool :)
@sbonelongcobo4588
@sbonelongcobo4588 8 лет назад
did you find any solution?
@officialsachinverma
@officialsachinverma 8 лет назад
thank you :)
@Bilbo736
@Bilbo736 8 лет назад
Where does TFaddress come from? When I implement findViewById(), TFaddress is highlighted red because its not being recognized.
@Bunfire123
@Bunfire123 8 лет назад
+Bilbo736 Make sure you've imported the relevant libraries.
@scottsmith4768
@scottsmith4768 6 лет назад
The search bar and the button don't appear when i load that app on my phone, why is this?
@potter.motion
@potter.motion 8 лет назад
Good evening, I would like to contact someone from the channel, need help with a project and wanted to take some doubts.
@Angee19
@Angee19 6 лет назад
Does it work in the emulator does it have to be in a cell phone?
@amitbd1508
@amitbd1508 8 лет назад
love it
@RyanPoulier
@RyanPoulier 8 лет назад
What can I do to prevent the app crashing if the location is not found?
@sunshineplayzroblox4077
@sunshineplayzroblox4077 8 лет назад
Hi, how would I search for places such as temples, mosques, restaurants and halal restaurants? Some one please help as I need some serious HELP
@VIVEKNAINable
@VIVEKNAINable 9 лет назад
How to open google map default at my location?? If you can post a tutorial on this... I wud be very happy. :)
@FabricioVillela
@FabricioVillela 8 лет назад
how to use this code in a class fragment ?
@bouchrarekhadda2093
@bouchrarekhadda2093 9 лет назад
hi, i'm a beginner with android studio, and i'm working on a project in which i use google maps, i followed every step like you did, but while running my application, it doesn't show the little blue circle that indicates my location, and i searched in google for any solution, but in vain; i hope you will answer me :)
@TechAcademy8
@TechAcademy8 9 лет назад
bouchra rekha I will need to check your code. Email me your code at techacademy8@gmail.com I will check it
@AkangIzulthea
@AkangIzulthea 6 лет назад
thank you
@vidyasagarreddy9368
@vidyasagarreddy9368 7 лет назад
can we usenavigation????
@javedalam7383
@javedalam7383 7 лет назад
and from where you called your Button
@rashmieshwar4845
@rashmieshwar4845 5 лет назад
How to resolve getMap() error. it is showing cannot resolve getMap method
@shivammittal8021
@shivammittal8021 6 лет назад
After getting blue dot , can anyone tell me how to get LatLng coordinates of that location.
@obama027
@obama027 9 лет назад
How to remove the previous view onSeach click. After a new search the revious markup is still there.
@AhsanKhan5925
@AhsanKhan5925 8 лет назад
+Abhijit Ray mMap.clear(); in the start of onSearch();
@SCIENTIUMM
@SCIENTIUMM 8 лет назад
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Address.getLatitude()' on a null object reference
@sarojtamang8498
@sarojtamang8498 8 лет назад
which file has the code for the current location?
@shreyastasamal3549
@shreyastasamal3549 8 лет назад
Hi Tech Academy, I'm not having setUpMapIf Needed library in my MapsActivity.java file,as I'm unable to find the command setUpMapIfNeeded();, also when I type the necessary command ,I get red lines everywhere, can anybody help me out with this coed ,also I'm not getting any marker in my emulator , I'm open to suggestions,please help me out.Also the min sdk version thatI'm using is 17, and the android studio version is 2.1 and I'm using a googlemaps acitivity, I still don't understand why I'm not getting the setUpMapIfNeeded command and also the rest of the inbuilt code snippet. This is the code snippet that I'm getting: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); // Obtain the SupportMapFragment and get notified when the map is ready to be used. SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); } @Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; // Add a marker in Sydney and move the camera LatLng sydney = new LatLng(-34, 151); mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney")); mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney)); } } It's not the same code as yours and I'm unable to get the marker as well, please help me out.
@jimoo4
@jimoo4 9 лет назад
If on the edittext we don't write a location and press search, the app crashes. How can I fix it?
@TechAcademy8
@TechAcademy8 9 лет назад
jimoo4 You can check if the edittext string is empty or not by using "isEmpty()" function. And if it is empty then you can show a popup message stating that the user has not entered anything.
@jimoo4
@jimoo4 9 лет назад
Hi , thanks for your answer. I did this EditText etLocationA = (EditText) findViewById(R.id.etLocationA); String strLocationA = etLocationA.getText().toString(); List lAddressA = null; boolean didItWork = true; if (mLocA != null) mLocA.remove(); Geocoder gcA = new Geocoder(this); try { lAddressA = gcA.getFromLocationName(strLocationA, 1); } catch (IOException e) { didItWork = false; e.printStackTrace(); and it worked.Tech Academy
@ooziiee
@ooziiee 8 лет назад
what is mLocA ?
@jimoo4915
@jimoo4915 8 лет назад
It is the marker of the location
@nehameshram5490
@nehameshram5490 4 года назад
or you can just change this line if (location != null || !location.equals("")) instead of 'OR' write 'AND' like this if (location != null && !location.equals("")) this will work plus you can also give a toast message if the edittext is empty.
@murinho7
@murinho7 7 лет назад
Hey, is this tutorial also searching for full adresses? Like entering street and number???
@TechAcademy8
@TechAcademy8 7 лет назад
No, you can use places search bar for that.
@murinho7
@murinho7 7 лет назад
Hey, thank you for the fast reply :) . Im currently doing your Google Maps | Calculate Distance Between 2 Locations Tutorial from 18.07.2017. Do i need to start from the very first tutorial to handle this?? i just want to have distance from my current location to my searched address. I have the search bar, the search button, and the "to" button. Searching is working properly, and getting current location also. Im getting current location with statement: mMap.setMyLocationEnabled(true); But then i add the "To" Button. I used if statements to handle the button clicks. I initialize all the markers like you and call the Location.Distance.Between. method. i cant find in this tutorial where you initialize the latitude and longtitude from the current location??? e.g. mMap.getMyLocation().getLatitude() is not working. How do you get the current location latitude and longtitude??? Thank you in advance. If you want i can send you fast email with my code.
@TechAcademy8
@TechAcademy8 7 лет назад
The first 4 parts of the updated google maps tutorials are for getting current location, 5th part is for adding the search bar which you already did. You don't need to watch the nearby places tutorials if you don't want to add that functionality. I fetched the latitude and longitude values in onLocationChanged method. Watch the first 4 parts and update your code accordingly. Actually just parts 2-4. I am not doing anything in the first part. It is just for setting up API key and creating a new app and testing it.
@murinho7
@murinho7 7 лет назад
Your Awesome
@TechAcademy8
@TechAcademy8 7 лет назад
You are welcome :-)
@hardeephappy345
@hardeephappy345 7 лет назад
hy its not working for android studio v 2.2.3 it constantly given an error
@gundeepsingh8274
@gundeepsingh8274 7 лет назад
Can u plzz tell me how will I set marker click listener??
@TechAcademy8
@TechAcademy8 7 лет назад
You can implement the class by GoogleMap.OnMarkerClickListener and then in the onMapReady method, write map.setOnMarkerClickListener(this). Refer my updated google maps series. I have used this in that tutorial.
@taqitahmidtanzil2851
@taqitahmidtanzil2851 8 лет назад
i got error here mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)) .getMap(); //it says "can't resolve method .getmap"
@technopro1699
@technopro1699 8 лет назад
download sdk google play service
Далее
Google Maps Tutorial : Part 3 (Change Map Type & Zoom)
10:23
ŠKODA не перестает удивлять
00:48
Просмотров 440 тыс.
Скинь той самой ❤️‍🔥
00:15
Просмотров 17 тыс.
How to Use Google Maps on iPhone (2024)
5:36
Просмотров 3,1 тыс.
Why Are Open Source Alternatives So Bad?
13:06
Просмотров 657 тыс.
OxygenOS 15 Launch Event | Speed Meets AI
17:46
Просмотров 298 тыс.
I poured all the galaxies in the Universe into a pool
15:34
Android app to Track your location using Google Map API
27:38
ŠKODA не перестает удивлять
00:48
Просмотров 440 тыс.