WEBVTT

00:00.160 --> 00:09.880
The third widget or overlay we're gonna implement for our application is the disappearing scale bar.

00:09.920 --> 00:12.720
In the previous videos we talked about the scale bar.

00:12.720 --> 00:21.880
In this video, I'll implement another version of scale bars since we have added the maps compose widget

00:21.880 --> 00:24.600
dependency in the previous videos.

00:24.920 --> 00:33.960
So this widget and this library is very important for uh, for scale bars, the scale bar is a widget

00:33.960 --> 00:42.000
that shows the current scale of the map in feet and meters when zoomed in into the map, changing to

00:42.040 --> 00:44.680
miles and kilometers respectively.

00:44.680 --> 00:51.840
When zooming out, a disappearing scale bar is also included, which appears when the zoom level of

00:51.840 --> 00:56.800
the map changes, and when then and then disappears.

00:56.800 --> 01:00.360
After a configurable timeout period.

01:00.400 --> 01:08.680
You can create a scale bar that we used in the previous videos, but in this video I'll include a new

01:08.840 --> 01:11.240
version or another version of this.

01:11.480 --> 01:12.440
Scale bars.

01:12.770 --> 01:14.450
This appearing scale bar.

01:14.610 --> 01:19.130
Set the modifier to modifier alignment top start.

01:19.170 --> 01:24.490
To start, I need it to the left and set the modifier.

01:24.530 --> 01:25.770
Set the padding.

01:25.810 --> 01:30.010
For example like top five dps.

01:30.170 --> 01:38.170
It's good, and the most significant thing we need to specify is the camera position.

01:38.490 --> 01:45.090
So set the camera position state equals to camera position state.

01:45.130 --> 01:46.970
Let me run our application.

01:46.970 --> 01:54.330
And here inside this box of the Uber clone map we have Google map expandable fab and the disappearing

01:54.330 --> 01:55.170
scale bar.

01:55.210 --> 01:56.690
This is our scale bar.

01:56.690 --> 01:58.810
You see that it disappears.

01:58.930 --> 02:04.290
If I zoom in you notice that it it displays the.

02:04.570 --> 02:05.530
And here we go.

02:05.770 --> 02:08.890
We are displaying the scale bar okay.

02:09.130 --> 02:11.570
So congratulations guys.

02:11.730 --> 02:16.730
We, uh, succeeded in adding that disappearing scale bar.

02:16.930 --> 02:25.090
So this is very important for our application in order to set the scale bar widget.
