Hired Yvonne.
So in this story we're going to add our own logic here to this on my freedom effort inside this mass
activity class.
So here you can see that we have this on my reading of it and this is the latitude and longitude of
the Iceland.
So let me just take that at you here I stand and here we have it says at the market in Iceland so let
me change this body to Iceland and move the camera.
So here it is the land the latitude Iceland latitude and longitude of Iceland here.
So let's delete these two quotes here that actually added as a marker and moves the camera to this actually
the latitude longitude Iceland.
Now after this line of code here I'm going to add up my own logic here to this Meffert.
So let's see what we are going to do next.
So first of all I want to specify that how much I want the camera to zooming in this place.
You know Iceland.
So first I need to create a variable of type camera update and the name of this variable is camera update
assignment operator and here I can say Chaminda update factory that's new.
Let's land zoom.
OK.
Choose the Smurfette here.
So first of all we need to pass a value of Flatland which is going to be the location here Iceland and
the second Actually argument is going to specify the actually the value that you want that specifies
how much we want the camera to zoom in this place.
So let's pass the Iceland here comma and here for the second argument I can pass the value to any point
zero that specifies how much this camera is going to zoom in displace here.
So now I can say a map does move camera camera up that let's run the application now.
Let me show you the simulator.
But here we have a problem.
So you can see that the camera is too much zoomed in this place here that we cannot actually see what's
going on here.
So let's change this value here.
Number 20 Let's send you to number five.
OK Point Number five point zero.
Let's run the application again.
Let me show you the emulator.
And by the way it is the shortcut to run the application here.
You can actually hold down the control on your keyboard and then press on the letter or key on your
keyboard.
So now you can see that we have this Iceland here and the camera is in this place here.
But the value at this time is five point zero F here.
Right.
So that's it.
Let's go back to android studio.
And now after this line of code let's add some more lines of code here.
So now I want to add a marker to this place here.
Iceland.
So in order to do that we need to create a variable of type marshal options.
So just they've been here Marchal options and the name of this variable is market options.
It's I mean operator new market options so let's create an object of like market options semicolon and
it is specified the position of this market option so just say in here multiple options that position
the position is going to be Iceland.
So just they've been here Iceland semicolon.
And now let's specify the title of these market options here.
So I can see multiple options that title Putu Cox you just type in here Welkom to Iceland.
We'll come to Iceland.
Semi-colon and let's add snippets to this market options so we can see market options that snippet to
quotes and what I can say for example.
Fantastic fantastic semi-colon.
And finally we need to add this market options to the map so I can say map that at multiple options
that are actually at mulcher and this and here and here we just need to pass the value of the market
options so we have this value here multiple options semi-colon.
Now let's run the application.
Let me show you the emulator.
So here you can see that this monitor here is actually added to this place here.
If I click on it here you can see that the title is welcome to Iceland.
And this snippet is fantastic.
Right.
So that's it.
Let's go back to android studio and here after these lines of code that actually adds a marker to this
place ice then.
Now we're going to add actually more coats here.
So now I want to create a circle around this location here inside our app on our map actually.
So let's go back to our method here.
Inside this maps activity class and below these lines of code that actually sets them market options
here for this location.
I can create a variable of type circle options and the name of this variable is circle options assigning
operator new circle options semicolon So we created an object of type circle options and we assigned
this object to this valuable circle options.
So now I need to specify the center of the circle so the center of the circle is going to be this location.
Iceland.
So I can't say circle options that center and it is going to be Iceland semicolon and again circle options
that radius so I'm going to specify the radius of this actually circle around this place.
Iceland.
So the radius is going to be free hundred which is actually double right.
So we just need to really need to pass a double value but it is OK to pass an integer value here because
it can be converted to a double value.
OK.
Radius and here and here I can specify this through width of this circle here around this place.
Iceland so I can say circle options that stroke.
So here it is going to be twenty point zero which is actually a float value right semicolon.
And finally let's specify the color of the circle around this place circle options that actually sets
that color excuse me that is 3 color structure color so the color is going to be yellow colored that
yellow semi-colon.
And finally we need to add this circle to the map so a map that at circle circle options.
Semicolon.
Let's run the application now.
Let me show you the emulator.
So here you can see that our application is running on the simulator.
And here this is Iceland but we can't see this circle around this area because we must actually first
zoom in this place here.
In order to see the circle.
So in order to zoom here just double click here on this Iceland here around this monitor here just double
click here double click in order to zoom.
And now you can see this actually the yellow circle around these marker here.
Right.
So that's it.
And now you can see that the color is yellow.
You can see that this track which is 20 and the radius is 300.
If you want to you can actually change the value of this zoom in here.
So let's go back 200 Studia insert is on the left here.
We have specified this value number five point zero.
So let's change this value to for example Number ten point zero.
So let's change it to ten point zero F..
Let's run the application again.
Let me show you the emulator.
So here you can see this yellow circle here around this area.
Yet if I zoom in again here now you can see this yellow circle right.
If you want to you can actually change this to for example number of 14.
Let's run the map again.
Let me show you the emulator.
So now you can see this yellow circle here right.
So that's it that's enough for this story.
If you have any questions about the concepts that I taught you in this lesson.
Please post the discussion in the course and then I'll do my best to answer all of your questions.
Thank you very much for watching.
And in the next tutorial.