WEBVTT

00:00.080 --> 00:00.920
Welcome back.

00:01.160 --> 00:08.800
I want from you to focus with me because this is a very important video I'm describing, and I'm showing

00:08.800 --> 00:15.360
you how to solve major problems in the next updates and the next versions of Android.

00:15.600 --> 00:22.760
Android is keep updating and many documentations are deprecated.

00:22.760 --> 00:24.960
Many classes are changed.

00:24.960 --> 00:27.360
Many composables are changed.

00:27.560 --> 00:29.520
How to deal with this change?

00:29.520 --> 00:39.040
I'm showing you how to, uh, to uh, get the correct parameters, how to specify the correct parameters

00:39.040 --> 00:40.760
of the composables.

00:41.000 --> 00:43.920
For example, here we have the ground overlay.

00:44.200 --> 00:52.680
The position was a lat long bounce, but in the new version of Android and the new updates is changed

00:52.680 --> 00:55.640
to be a ground overlay position.

00:55.640 --> 01:03.520
And this is a problem for me because I created a new, uh, valuable according to the documentations

01:03.520 --> 01:04.760
and specify it here.

01:04.760 --> 01:05.920
But there is an error.

01:05.960 --> 01:10.540
We need to create a ground overlay position in order to solve this issue.

01:10.580 --> 01:16.540
We need to follow the documentation and the the declarations.

01:16.780 --> 01:18.860
Ctrl and left click.

01:19.060 --> 01:20.940
We open the ground overlay.

01:21.220 --> 01:23.340
Here we have many parameters.

01:23.340 --> 01:26.020
We have the position image and so on.

01:26.060 --> 01:31.380
We need to specify the position which is a ground overlay position.

01:31.380 --> 01:34.260
Also Ctrl and left click.

01:34.580 --> 01:38.980
So the first thing is to keep tracking.

01:39.020 --> 01:45.580
Keep going deep diving into the documentations and the declarations.

01:45.620 --> 01:47.060
Open the ground overlay.

01:47.060 --> 01:51.300
And here we have the ground overlay position which is a class.

01:51.340 --> 01:58.860
Inside this class we have a constructor having four parameters lat long bounds location width and height.

01:58.860 --> 02:03.220
And also we have a companion object.

02:03.220 --> 02:06.780
So this is the scope of the ground overlay position.

02:06.780 --> 02:12.310
Please pay attention I'm showing you how to think how to solve your problems.

02:12.310 --> 02:13.310
Your own problems.

02:13.310 --> 02:18.270
You don't need me or ChatGPT or Deep Sea or any other because you.

02:18.310 --> 02:19.870
This is a waste of time.

02:19.870 --> 02:27.670
You should solve your problems by your own and keep updating and keep tracking.

02:27.790 --> 02:37.830
Okay, so the ground overlay position class has four parameters and a companion object with two with

02:37.870 --> 02:39.190
two functions.

02:39.230 --> 02:42.750
The first one is create and the second one is create.

02:42.950 --> 02:50.910
The first create function takes a lat long bounds as a parameter and returns a ground overlay position.

02:50.910 --> 02:54.830
And the second case we have a create function.

02:54.870 --> 03:01.510
Taking to the parameter location with height and returns a ground of position.

03:01.830 --> 03:02.870
So in.

03:02.910 --> 03:10.510
In both cases we return a ground overlay position and this is the required thing we need to get here

03:10.510 --> 03:13.230
inside the position of the ground overlay.

03:13.230 --> 03:19.970
But which one we need to pass since we created a Manhattan bounds which is a lat long bounds.

03:19.970 --> 03:23.490
So I'm going to use this create function.

03:23.530 --> 03:27.250
And by the way here is a method over loading.

03:27.250 --> 03:35.810
So create a new variable called position or lay equals to ground.

03:36.010 --> 03:45.010
Let me check ground overlay position I'm creating an instance of this variable ground overlay position

03:45.050 --> 03:49.770
dot create I'm calling this function create.

03:49.810 --> 03:56.730
I'm passing the lat long bounds to it to return a ground overlay position with the specified lat long

03:56.770 --> 04:06.290
bounds dot, create which one I need to pass the first one and Manhattan bounds okay, so this position

04:06.290 --> 04:10.450
overlay variable it's of type ground overlay position.

04:10.450 --> 04:14.650
Now I can use it here inside the ground overlay.

04:14.970 --> 04:17.570
Let me run and see the magic.

04:17.570 --> 04:18.170
Here we go.

04:18.210 --> 04:19.410
This is our map.

04:19.410 --> 04:22.250
Let me dive into New York.

04:22.250 --> 04:22.460
IRC.

04:22.500 --> 04:24.580
And here we go.

04:25.020 --> 04:28.500
This is our map overlay.

04:28.540 --> 04:36.420
You can notice that it is not, uh, exactly over the the New York map.

04:36.420 --> 04:38.820
So this is the vertex here.

04:38.820 --> 04:40.340
So I need to specify it here.

04:40.340 --> 04:45.620
You can use other parameters like rotation like blurring.

04:45.780 --> 04:50.460
Let me return it for example 0.3 degrees.

04:50.460 --> 04:51.740
It's not tilted.

04:51.740 --> 04:55.060
So I'm going to use 30 degrees.

04:55.100 --> 04:56.380
Let me check again.

04:56.380 --> 04:57.220
And here we go.

04:57.260 --> 04:58.460
It's better now.

04:58.620 --> 04:59.940
It's matching.

05:00.140 --> 05:08.820
Uh New York I can increase the the bounds I can increase and edit the image and so on okay.

05:08.980 --> 05:10.900
So congratulations guys.

05:10.900 --> 05:20.140
We succeeded in displaying a ground overlay, which is an overlay over the map used for historical maps

05:20.260 --> 05:28.820
showing constructions, adding custom map layers, visualizing heatmaps, or special or specific zones.
