Hey Luca, Much needed video. Could u please tell how u created custom marker at 12:22 which has text.
@lucanicoletti11 күн бұрын
Hello, on the screen at 12:22 is a custom implementation of the `clusterItemContent`, which lets you use any `@Composable` as a marker during clustering. If you want to achieve that with Markers alone, you'd need to create a Bitmap (drawing on a Canvas whatever you need), and use the Bitmap as a custom `icon` on the `Marker` composable function. Hope this helps
@pawandeepsingh63658 күн бұрын
@@lucanicoletti I am new to Android, do you have repo where I can see code?
@lucanicoletti7 күн бұрын
@@pawandeepsingh6365 At the moment that repository is not public. I'm happy to send the code over via email for that specific part if necessary.
@HiddenMugs12 күн бұрын
Cool stuff! Nice summary of your previous videos
@lucanicoletti12 күн бұрын
Thanks!
@TheYGFAMILYCLUB15 күн бұрын
Thankyou ❤
@lucanicoletti15 күн бұрын
Thank to you for watching and supporting the channel!
@SerhiiU-p4s20 күн бұрын
Hi! Watched all videos “google maps compose”. Thanks for the great content, it’s very helpful. Keep it up!
@lucanicoletti20 күн бұрын
Thanks, glad you enjoyed them :)
@jopadjr24 күн бұрын
1st...Thanks Luca
@josefm726525 күн бұрын
Awesome video! I tried to follow your tutorial and it worked but after the user is located, if I move away from the place and press the button again, it does not locate automatically the user (and also remains on the same image and not blank in the middle). How can I implement this feature as in default google maps?
@lucanicoletti24 күн бұрын
You’d need to subscribe to the position locator via a request, update the camera position and the dot itself through the position received. A bit more complex but totally doable!
@jante-adebowale27 күн бұрын
Excellent !
@lucanicoletti26 күн бұрын
Thank you! Glad you enjoyed my content
@jopadjrАй бұрын
3rd... Thanks. Would you mind creating a complete app regarding Maps. Thanks in advance
@lucanicolettiАй бұрын
What app would you be interesting in? Several screens with different things inside? One for markers, polygons, circles, polylines, overlays, etc?
@jopadjrАй бұрын
@@lucanicoletti Hi Luca, If possible, I’m looking for a simple app with the following functionality: First, I want to search for a place using the Places API and save the results in a ROOM database. Once the saving process is complete, the app should display a main screen with a list of the saved addresses. There should be an option to sort the list in ascending order based on proximity to my current location. Another screen should display connected lines between these places and my current location. This is the basic concept I have in mind.
@lucanicolettiАй бұрын
I see, that goes well beyond a simple tutorial, implies using additional API and a complex project setup, I doubt you’d find any code that does all of that! But that’s the beauty of programming, getting multiple small bits together on your own
@Rick24056Ай бұрын
hey Luca! thank you for that content! +1 Sub
@lucanicolettiАй бұрын
Thanks! Hope you enjoy all my content 😌
@RonakMishra-m4kАй бұрын
i cant use build config.debug even after adding the dependency
@lucanicolettiАй бұрын
Have you added the `buildFeatures` inside the `android` body? This is not a dependency
@RonakMishra-m4kАй бұрын
@@lucanicoletti yes buildConfig = true is in android body in gradle seting
@RonakMishra-m4kАй бұрын
whenever I try to use buildConfig.DEBUG its showing unresolved reference
@lucanicolettiАй бұрын
Have you rebuilt the project after adding that line?
@RonakMishra-m4kАй бұрын
@@lucanicoletti yes
@alexcostafotografiaАй бұрын
got stuck cant import androidx.glance.appwidget.components so no Scaffold my references are ok
@alexcostafotografiaАй бұрын
Never mind. Just got to my catalog and updated all versions including glance to 1.1.0 it showed up
@lucanicolettiАй бұрын
Sorry I missed this comment, glad you found a solution. Yes, Scaffold was introduced in 1.1.0, not from 1.0.0. Let's see what future versions will get us :)
@alexcostafotografiaАй бұрын
@@lucanicoletti Question is compose and glance a standard in corporate work? I stayed a long time far from coding hard to know what are the standards these days
@lucanicolettiАй бұрын
Compose is for sure. Glance is for building widgets, not many apps have widgets and it’s still restricted compared to the old Widget systems. But a good start point!
@rodrigopissinatedeangeli5500Ай бұрын
Helped a lot. Thanks
@lucanicolettiАй бұрын
Glad it helped
@RonakMishra-m4kАй бұрын
amazing
@lucanicolettiАй бұрын
Thanks ☺️
@mohamedasraf4175Ай бұрын
Bro please teach massive UI
@lucanicolettiАй бұрын
What do you mean by Massive UI?
@mohamedasraf4175Ай бұрын
Hotel booking application, Uber application etc...
@HiddenMugs2 ай бұрын
This sounds genuinely useful!
@lucanicoletti2 ай бұрын
It is! You still don’t have embedded emulators on XCode, do you?
@HiddenMugs2 ай бұрын
@@lucanicoletti I hope we never get them tbh, my confidence in the Xcode team diminishes every year hahaha
@hiraeth55742 ай бұрын
👍
@roshanfx3692 ай бұрын
if u could add github code link in description, it will be helpful.
@lucanicoletti2 ай бұрын
Thanks for the comment! Do you mean my code or the links to the official libraries and examples? My code is currently on private repositories
@roshanfx3692 ай бұрын
@@lucanicoletti I was talking about your code. I thought it was public. No problem.
@lucanicoletti2 ай бұрын
Not for now no, mostly because it’s not well thought. As in my latest video I use injection of a repository in an Activity which shouldn’t be done. I don’t want people to get that as an example.
@mariohuizinga17692 ай бұрын
Hi Luca, great video, thanks. Question: clicking on a Cluster or ClusterItem by default shows the InfoWindow and centers the clicked item. But I only need to show the InfoWindow without centering the item. How can I achieve that?
@lucanicoletti2 ай бұрын
Hi @mariohuizinga1769 , thanks for the reply! Unfortunately there is no way to specify that you want only part of the default click implementation. If you want only one of the two actions to take place, you would need to implement that by yourself inside the onClick listener, and return `false` to prevent the default implementation from happening
@mariohuizinga17692 ай бұрын
@@lucanicoletti You probably mean return `true` to disable default behaviour, I found out that part. But I can't find a way to call `showInfoWindow` in the onClusterItemClick listener, as it only provides the ClusterItem as a parameter. How can I get to the MarkerState of the clicked Marker to call showInfoWindow? Maybe this question is just to complicated as a comment to your video, no problem. I just hoped you might know an easy path.
@lucanicoletti2 ай бұрын
@@mariohuizinga1769 There is no easy path. My mistake, I meant `true`, correct. You would need to create a view yourself for each marker, and display it when the user taps on the specific marker.
@prod.avarice2 ай бұрын
Hey Luca. I have an issue where I have a Google Maps Composable within a Lazy Column, and due to that, I cannot scroll down in the Google Map composable as it causes the entire screen to scroll. Could you cover how to fix this type of issue? it would be greatly appreciated :)
@lucanicoletti2 ай бұрын
Hey! Thanks for you comment! I'll take a look at this scenario and come back with a solution
@prod.avarice2 ай бұрын
@@lucanicoletti Thank you so much 🙏 you provide the best tutorials I have ever seen. Keep it up🗣
@lucanicoletti2 ай бұрын
Thanks ☺️ I appreciate that
@lucanicoletti2 ай бұрын
Hey @prod.avarice, I did some research and found this: github.com/googlemaps/android-maps-compose/blob/main/app/src/main/java/com/google/maps/android/compose/MapInColumnActivity.kt The example from the documentation show how to handle this scenario. If you don't find it clear, let me know and I'll create a video for it!
@mandalorian35402 ай бұрын
I just discovered you!
@lucanicoletti2 ай бұрын
Thanks for watching! Hope you enjoy the content 😌
@hyperfitnz2 ай бұрын
Great video. I'm doing this without jetpack compose. At the moment if my clusterhandleclick uses GoogleMap to add the items it works but if I leave it for the clustermanager to handle when zooming in the contents of the cluster aren't displayed
@lucanicoletti2 ай бұрын
Thanks for the comment. I don't really understand what you're trying to achieve, and without looking at the code it would be hard for me to diagnose the problem.
@hyperfitnz2 ай бұрын
Hey thank you for getting back to me!!! I mean like this ( private fun handleClusterClick(cluster: Cluster<MarkerDTO>) { googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(cluster.position, (googleMap.cameraPosition.zoom + 2)), object : GoogleMap.CancelableCallback { override fun onFinish() { cluster.items.forEachIndexed { index, markerDTO -> val offset = calculateOffset(index) val newPosition = LatLng(cluster.position.latitude + offset.first, cluster.position.longitude + offset.second) val markerOptions = MarkerOptions() .position(newPosition) .title(markerDTO.name) .snippet(markerDTO.snippet) .icon(BitmapDescriptorFactory.fromResource(R.drawable.tools_icon)) googleMap.addMarker(markerOptions) } } override fun onCancel() {} }) }) If I don't do googleMap.addMarker and just let the clustermanager handle it, the markers don't show it just zooms into the cluster but won't like uncuster it. I hope this makes sense? by the way I am using xml and the above code is from one of my fragments.
@lucanicoletti2 ай бұрын
If you already have clusters and markers on your map you don't need to add them again to the map when handling a click. It's all handled for you. Tapping on a cluster will zoom in and display the markers if the zoom is enough to show them.
@hyperfitnz2 ай бұрын
@@lucanicoletti thanks for replying dude! I just subd to your channel :) I already read that but for some reason when I don't readd them and I click then it just zooms in on the cluster, like it never unclusters it? Another question please if you don't mind, have you managed to work any buttons in the custom info window?
@lucanicoletti2 ай бұрын
@@hyperfitnz For the first: the markers need to be at a given distance, perhaps 1 step of zoom is not enough to separate them from the cluster. For the second, I haven't try yet, no, did you face any problems?
@ДенисКолчев-щ4с3 ай бұрын
I expected from that video something else, not a review of what Apple showed on the stage once again :/
@lucanicoletti3 ай бұрын
I mentioned a few comparisons with what Android has already, and what iOS developers will have to deal with differently (for the icons for example). May I ask what was in your mind?
@anvndev3 ай бұрын
Thanks for bro, have a nice day
@lucanicoletti2 ай бұрын
Thank you too
@HiddenMugs3 ай бұрын
Sticky lines took me a while to get used to in Xcode, only structure headers and method signatures stick, no closing braces
@lucanicoletti3 ай бұрын
When did they release it on XCode?
@HiddenMugs3 ай бұрын
@@lucanicoletti ~September 2022, it was probably the single feature xcode had that intellij didn't haha
@lucanicoletti3 ай бұрын
But it works. It doesn’t properly in AS, for now…
@clelialopez4 ай бұрын
Thank you very much for these Google Maps videos, they helped me a lot!
@lucanicoletti4 ай бұрын
I’m glad they were useful :)
@prev_knowunique4 ай бұрын
Really a great help. I am a beginner in Android Studio , I am confused in between kotlin with xml or kotlin with jetpack compose. if u can guide which one should i do, that will be a great help. Thank You So Much. Waiting for your response..
@lucanicoletti4 ай бұрын
Hey! So the industry is moving to Jetpack Compose and nowadays almost everyone uses it. I would recommend studying it, it’s also more enjoyable to use and easier to grasp!
@HiddenMugs4 ай бұрын
Great recap!
@lucanicoletti4 ай бұрын
Thanks!
@jopadjr4 ай бұрын
3rd...Thanks Luca. Looking forward to all of your videos. Cheers !!!
@lucanicoletti4 ай бұрын
Glad you like them!
@HiddenMugs4 ай бұрын
May be the hardest, but it's definately the one that creates the best differentiating factor in any app! If you have the resources haha
@lucanicoletti4 ай бұрын
Always like that: the bigger the struggle, the better the results
@TheYGFAMILYCLUB4 ай бұрын
Great video !!
@lucanicoletti4 ай бұрын
Thanks ☺️
@TheYGFAMILYCLUB4 ай бұрын
Thank you !! Looking forward to more jetpack compose contents, will cont watch this maps series till the end ! I m a beginner so your video about maps really help me so much ❤
@lucanicoletti4 ай бұрын
Thanks to you for watching! There’s a new one coming out soon! 👀
@HiddenMugs4 ай бұрын
Had genuinely no idea about this!
@lucanicoletti4 ай бұрын
You should have seen my face when I found out! 🤨
@dewetvanrooyen84585 ай бұрын
HI for you next video is it possible to make you screen text with the code bigger!!`?? Thought to follow along.
@lucanicoletti5 ай бұрын
My latest video should have a bigger font already, give those a try and let me know if that is enough or if I should increase it even more.
@MAHMOODAHMAD-nr4wo5 ай бұрын
Great video
@lucanicoletti5 ай бұрын
Thanks ☺️
@Cyber-lw1bi5 ай бұрын
nice thank you
@lucanicoletti5 ай бұрын
Thank you for watching!
@GhamzaJd6 ай бұрын
Best thumbnail 😎Very informative video!
@lucanicoletti6 ай бұрын
Thanks 🙏🏼 tried to be funny on the thumbnail 😂
@HiddenMugs6 ай бұрын
This is actually useful! It's not a problem on Xcode because... it none of such tools 🤣
@lucanicoletti6 ай бұрын
The Logcan Panel is the equivalent of DebugArea with Console shown
@DanielLopes-j6k6 ай бұрын
Very good
@lucanicoletti6 ай бұрын
Thanks :)
@wilkq11106 ай бұрын
hi, do you have this project on GitHub?
@lucanicoletti6 ай бұрын
I don’t right now, mostly because from one video to the other I removed the code to show new things. But I could create a project with a few examples. The official GitHub page of the GoogleMaps Compose has plenty of examples and a good documentation
@paulinammonroy6 ай бұрын
Excelent video! I am interested in knowing more about clustering.
@lucanicoletti6 ай бұрын
Thanks! What would you like to know?
@paulinammonroy6 ай бұрын
I want to customize the cluster component with a Bitmap I've already customized the normal marker, but I also want to do the same with the cluster. I think I am close, I am trying to use onBeforeClusterRender using the DefaultClusterRenderer class.
@HiddenMugs6 ай бұрын
Default values being radius=0 and background=transparent is such a troll move 🤣🤣
@lucanicoletti6 ай бұрын
I understand the radius being zero as they can’t predict how big you want a circle to be. But the colours should be black as it is in the other functions. Actually, requiring the radius would be a better choice.
@jopadjr6 ай бұрын
2nd..Thanks Luca. Great tutorial. Please continue on the map series. Im trying to create an app where I can save some places after I serach it, then once I opened up tha main app, it will sort based on my current location.
@lucanicoletti6 ай бұрын
The only two remaining are the TileOverlay and GroundOverlay, would you like a video on those?
@Cyber-lw1bi6 ай бұрын
@@lucanicoletti Hi this would be perfect as i need it for my project idea. It would be nice if you could also test some limits of the overlay approach, e.g. if the app can handle 1 million overlay squares on the map.
@lucanicoletti6 ай бұрын
@@Cyber-lw1bi I know for sure maps can handle several hundreds overlays at once, with smooth zoom and movements around. Never tried with thousands or millions. I guess it also depends on which overlay we’re talking about, the three in the video should be quite easy and perhaps also not draw when not in the maps boundaries 😄
@Cyber-lw1bi6 ай бұрын
@@lucanicoletti Ok I have now tried it with polygons, Basically I covered one country with a big polygon-rectangle and then tried to define several holes in this polygon. At approximately 500 rectangular holes in the polygon the app keeps crashing.... Do you think Ground Overlays or Tile Overlays are more efficient? I would really appreciate if you could explain both in a video soon, because there is absolutely no good documentation on the internet :))
@lucanicoletti6 ай бұрын
@@Cyber-lw1bi ground overlays and tile overlays are for a completely different reason. What is the crash about?
@jopadjr7 ай бұрын
4th... Thanks. Please continue some more Map apps
@Relaxwithpeter2547 ай бұрын
i wantt to draw a polygone, polyline, how do igo about that
@lucanicoletti7 ай бұрын
I will come up with a video tutorial for that as well! It's already planned
@Relaxwithpeter2547 ай бұрын
Cool, I will be on the look out
@lucanicoletti6 ай бұрын
The video for polygon, polylines and circles is up! It’s the latest one, you can check it out and let me know your thoughts ☺️
@naiaaiello8 ай бұрын
Great video Luca!
@lucanicoletti8 ай бұрын
Thanks!! 🙏🏼
@GhamzaJd8 ай бұрын
I'm Excited!
@lucanicoletti8 ай бұрын
Me too! Let’s see what we will get and be able to achieve!
@lucanicoletti8 ай бұрын
Sorry for the low audio quality! Tried my best to fix it in post, but I’m still learning! Next time it will be better!
@swiszcz939 ай бұрын
why does the audio sound doubled? it sounds like you might have two sources with a slight delay and they're both playing maybe. I would recommend using just one or syncing them
@lucanicoletti9 ай бұрын
I noticed it after uploading, there was only one source. I believe something went wrong while exporting the video. I had different frame rate and frequencies between takes - screen and video. So that may have been a problem. Latest video has no problems on audio if I’m not wrong! Thanks for pointing this out and let me know :)