Тёмный

Mapbox implementation in Android Studio using java 

Everyday Programmer
Подписаться 1,5 тыс.
Просмотров 9 тыс.
50% 1

In this video, we will learn how to implement a Mapbox map and show user location in an Android Studio project using Java.
We will start by creating a new Android Studio project and adding the Mapbox Android SDK. Then, we will create a MapView in our layout file and initialize it in our code. Next, we will add a LocationComponent to the map to show the user's location. Finally, we will add some code to update the map's zoom level whenever the user's location changes.
By the end of this video, you will be able to:
Create a Mapbox map in an Android Studio project
Show the user's location on a Mapbox map
Update the map's zoom level when the user's location changes
This video is for:
Android developers who want to learn how to use Mapbox maps in their apps and anyone who is interested in learning how to show user location on a map
Here are the steps you will need to follow:
Create a new Android Studio project.
1. Add the Mapbox Android SDK to your project.
2. Create a MapView in your layout file.
3. Initialize the MapView in your code.
4. Add a LocationComponent to the map.
5. Update the map's zoom level when the user's location changes.
Links & References:
Source Code: github.com/Everyday-Programme...
Source Code: tii.la/eENNew8So1u
Mapbox: www.mapbox.com/
Mapbox Android Docs: docs.mapbox.com/android/maps/...
Join membership to get access to perks & Complete Source Codes:
/ @everydayprogrammer
Subscribe: ru-vid.com...

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

 

31 июл 2023

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 60   
@thomaskappa4814
@thomaskappa4814 3 месяца назад
thanks buddy, this is a good tutorial.
@BHARATGARANDE
@BHARATGARANDE Год назад
Great informative video for Android developers sir..
@EverydayProgrammer
@EverydayProgrammer Год назад
Thank you so much for your kind words! I'm glad you enjoyed the content.
@user-mr1ex1bg3n
@user-mr1ex1bg3n 7 месяцев назад
太棒啦!谢谢你!
@EverydayProgrammer
@EverydayProgrammer 7 месяцев назад
非常感谢您的评论!
@user-qk4ss
@user-qk4ss Год назад
Great video , but try to give the more explanation regarding concept
@EverydayProgrammer
@EverydayProgrammer Год назад
Thank you for your feedback, I'll try my best.
@MrAyyoub1988
@MrAyyoub1988 10 месяцев назад
Thanks , please more videos about mapbox
@EverydayProgrammer
@EverydayProgrammer 10 месяцев назад
Sure! What tutorial would you like to see next ??
@9Megaloman
@9Megaloman 10 месяцев назад
@@EverydayProgrammer This video was very helpful, it would be nice to also see a guide on how to set a route to a specified point using Mapbox
@EverydayProgrammer
@EverydayProgrammer 10 месяцев назад
Sure! will make it.
@MrAyyoub1988
@MrAyyoub1988 10 месяцев назад
Can you make a combination with firebase, to send location data to Firestone using another button like sharing location, to exploit that data stored to show it all device sync
@EverydayProgrammer
@EverydayProgrammer 10 месяцев назад
There you go!: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cWWjbVPhh0k.html
@elsherman7861
@elsherman7861 Месяц назад
Be careful, you are declaring a private token in the string, which makes it easy to access the secret token.
@dukk5849
@dukk5849 4 месяца назад
Love your videos!! Can you please tell me how to set markers on spesific locations and make them tappable? Or can you suggest something? Thank you sirr.
@EverydayProgrammer
@EverydayProgrammer 3 месяца назад
Check this out ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-aj1JjrpYQfs.html
@yogeshpathania3053
@yogeshpathania3053 11 месяцев назад
Nice brother ❤️
@EverydayProgrammer
@EverydayProgrammer 11 месяцев назад
Thank you brother! 😃
@spyderkavin
@spyderkavin 5 месяцев назад
what if you want to use mapbox's default puck for user location?
@user-hc9zx7tc2e
@user-hc9zx7tc2e 10 месяцев назад
Would you make a series of mapbox tutorials in android studio using java? Because I hope that you will.
@EverydayProgrammer
@EverydayProgrammer 10 месяцев назад
Sure!
@user-hc9zx7tc2e
@user-hc9zx7tc2e 10 месяцев назад
@@EverydayProgrammer Thank you so much.
@klaivexd
@klaivexd 8 месяцев назад
Thanks for the tutorial video. Helped me a lot. Can you also create a tutorial on how to add event reminders for this navigation app in android studio java? Thank you!
@mic9969
@mic9969 11 месяцев назад
thx
@EverydayProgrammer
@EverydayProgrammer 11 месяцев назад
You're welcome!
@TheDARKOMETER
@TheDARKOMETER Месяц назад
Hello good sir, how were you able to learn these? I was reading the mapbox docs and I was almost brought to insanity because their docs are focused on kotlin and not java
@user-wr8dq2jk2d
@user-wr8dq2jk2d 2 месяца назад
Bro, when i coded "ACCESS_FINE_LOCATION " ( 9:21) android studio marked it as a mistake. It suggests to make a new class named "ACCESS_FINE_LOCATION " , but you did it with no problom. Could you help me pls🙏🙏
@user-wr8dq2jk2d
@user-wr8dq2jk2d 2 месяца назад
P.S: after adding the new class it didint work either
@EverydayProgrammer
@EverydayProgrammer 2 месяца назад
Replace the existing Manifest in the import section with import android.Manifest; or just use 'android.Manifest.permission.ACCESS_FINE_LOCATION'
@user-wr8dq2jk2d
@user-wr8dq2jk2d 2 месяца назад
@@EverydayProgrammer Thank you very much. I appreciate it. Your work on RU-vid helps lots of people around the world!
@EverydayProgrammer
@EverydayProgrammer 2 месяца назад
Thank you!!!
@user-wr8dq2jk2d
@user-wr8dq2jk2d 2 месяца назад
@@EverydayProgrammer Sorry, but there another issue (10:59) 'setBearingImage(com.mapbox.maps.ImageHolder)' in 'com.mapbox.maps.plugin.LocationPuck2D' cannot be applied to '(android.graphics.drawable.Drawable)' What i can do to deal with it?
@spyderkavin
@spyderkavin 5 месяцев назад
1 thing I suggest you test. If you take the phone and walk around, will the location updatelive, or unless you reload the app?
@spyderkavin
@spyderkavin 5 месяцев назад
I just tested it. it works
@ToniHenkelGrafvonFalkenstein
@ToniHenkelGrafvonFalkenstein 7 месяцев назад
Hello, I have the Problem on 11:02, in line 108 (locationPuck2D.setBearingImage(AppCompatResources.getDrawable(MainActivity.this, R.drawable.baseline_location_on_24)); ) he requiered type is image Holder, but I provide a Drawable. Can you help me please ?
@EverydayProgrammer
@EverydayProgrammer 7 месяцев назад
Try updating mapbox dependency version and make sure that your drawable is vector drawable.
@spyderkavin
@spyderkavin 5 месяцев назад
I had the same problem as well, and I solved it. Use the imageholder.from(R.id.baselince location on)
@thomaskappa4814
@thomaskappa4814 3 месяца назад
@@spyderkavin thanks, this was very useful !
@muneeburrehman4127
@muneeburrehman4127 3 месяца назад
can you help me i also have this error
@nitay2870
@nitay2870 6 месяцев назад
how to add markers to the map and customize them and make popup when click on them
@dukk5849
@dukk5849 4 месяца назад
Did you found any answers?
@MEImei-tk8zm
@MEImei-tk8zm 10 месяцев назад
Where do you get your reference on your code, mapbox has kotlin built reference, I really want to know how you create java mapbox v10 codes
@EverydayProgrammer
@EverydayProgrammer 10 месяцев назад
Well actually I use mapbox's kotlin documentation to implement mapbox in Android studio using kotlin and then I'll translate the code to java. There is no proper java documentation for mapbox atleast yet.
@MEImei-tk8zm
@MEImei-tk8zm 10 месяцев назад
@@EverydayProgrammer Do you manually translate it? Thanks for the reply, really wish you create a routing from current location to destination video
@EverydayProgrammer
@EverydayProgrammer 10 месяцев назад
Yeah, Actually routing is a bit harder even to implement using kotlin but I'm working on it and will upload a tutorial on it by the upcoming week (hopefully) 😅.
@MEImei-tk8zm
@MEImei-tk8zm 10 месяцев назад
@@EverydayProgrammer Thank you so much! it will be a huge help on our project
@EverydayProgrammer
@EverydayProgrammer 10 месяцев назад
There you go: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cWWjbVPhh0k.html Hope this helps
@RahulSingh-jc8gv
@RahulSingh-jc8gv 11 месяцев назад
Please make iptv app tutorial
@EverydayProgrammer
@EverydayProgrammer 11 месяцев назад
Sure!
@aiaee
@aiaee 7 месяцев назад
Hello please help, it says that setBearingImage cannot be applied in android graphics drawable Drawable 😭
@aiaee
@aiaee 7 месяцев назад
10:57 this part, i keep getting errors :(((
@EverydayProgrammer
@EverydayProgrammer 7 месяцев назад
Do not use vector drawable, use PNG image. And convert the png into drawable and parse it into setBearingImage.
@aiaee
@aiaee 7 месяцев назад
@@EverydayProgrammer hello, thank you but how would i do that? Im still learning sorryy
@EverydayProgrammer
@EverydayProgrammer 7 месяцев назад
I'm sorry you have to do the exact opposite of what I previously said. You have to use only vector drawable from vector assets in android studio. You can also download icons from Google Material Icons. Try the following icon: fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Alocation_on%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4024
@waicun9003
@waicun9003 5 месяцев назад
I don't know have you fixed it, But here what I have done, and it work!! ImageHolder imageHolder = ImageHolder.from(R.drawable.baseline_location_on_24); locationPuck2D.setBearingImage(imageHolder);@@aiaee
Далее
How to Create a Stopwatch App in Android Studio
11:18
Просмотров 3,6 тыс.
Я ВЕРНУЛСЯ 🔴 | WICSUR #shorts
00:57
Просмотров 2 млн
apex 5 первые полеты
4:56
Просмотров 77
So... why did AI take off now?
4:01
Просмотров 257
How To Access Any Forked GitHub Repositories Data
9:31