The third widget or overlay we're gonna implement for our application is the disappearing scale bar.
In the previous videos we talked about the scale bar.
In this video, I'll implement another version of scale bars since we have added the maps compose widget
dependency in the previous videos.
So this widget and this library is very important for uh, for scale bars, the scale bar is a widget
that shows the current scale of the map in feet and meters when zoomed in into the map, changing to
miles and kilometers respectively.
When zooming out, a disappearing scale bar is also included, which appears when the zoom level of
the map changes, and when then and then disappears.
After a configurable timeout period.
You can create a scale bar that we used in the previous videos, but in this video I'll include a new
version or another version of this.
Scale bars.
This appearing scale bar.
Set the modifier to modifier alignment top start.
To start, I need it to the left and set the modifier.
Set the padding.
For example like top five dps.
It's good, and the most significant thing we need to specify is the camera position.
So set the camera position state equals to camera position state.
Let me run our application.
And here inside this box of the Uber clone map we have Google map expandable fab and the disappearing
scale bar.
This is our scale bar.
You see that it disappears.
If I zoom in you notice that it it displays the.
And here we go.
We are displaying the scale bar okay.
So congratulations guys.
We, uh, succeeded in adding that disappearing scale bar.
So this is very important for our application in order to set the scale bar widget.