1
00:00:00,290 --> 00:00:01,300
Hired Yvonne.

2
00:00:01,470 --> 00:00:07,350
So in this story we're going to add our own logic here to this on my freedom effort inside this mass

3
00:00:07,350 --> 00:00:08,630
activity class.

4
00:00:08,730 --> 00:00:13,920
So here you can see that we have this on my reading of it and this is the latitude and longitude of

5
00:00:13,920 --> 00:00:14,860
the Iceland.

6
00:00:14,880 --> 00:00:22,290
So let me just take that at you here I stand and here we have it says at the market in Iceland so let

7
00:00:22,290 --> 00:00:26,950
me change this body to Iceland and move the camera.

8
00:00:26,970 --> 00:00:32,030
So here it is the land the latitude Iceland latitude and longitude of Iceland here.

9
00:00:32,070 --> 00:00:39,390
So let's delete these two quotes here that actually added as a marker and moves the camera to this actually

10
00:00:39,480 --> 00:00:41,530
the latitude longitude Iceland.

11
00:00:41,970 --> 00:00:47,320
Now after this line of code here I'm going to add up my own logic here to this Meffert.

12
00:00:47,340 --> 00:00:49,190
So let's see what we are going to do next.

13
00:00:50,070 --> 00:00:56,570
So first of all I want to specify that how much I want the camera to zooming in this place.

14
00:00:56,570 --> 00:00:57,600
You know Iceland.

15
00:00:57,600 --> 00:01:03,150
So first I need to create a variable of type camera update and the name of this variable is camera update

16
00:01:03,210 --> 00:01:08,520
assignment operator and here I can say Chaminda update factory that's new.

17
00:01:08,930 --> 00:01:10,530
Let's land zoom.

18
00:01:10,730 --> 00:01:10,980
OK.

19
00:01:10,980 --> 00:01:12,600
Choose the Smurfette here.

20
00:01:12,600 --> 00:01:18,240
So first of all we need to pass a value of Flatland which is going to be the location here Iceland and

21
00:01:18,240 --> 00:01:27,840
the second Actually argument is going to specify the actually the value that you want that specifies

22
00:01:27,870 --> 00:01:32,150
how much we want the camera to zoom in this place.

23
00:01:32,400 --> 00:01:38,790
So let's pass the Iceland here comma and here for the second argument I can pass the value to any point

24
00:01:38,820 --> 00:01:43,920
zero that specifies how much this camera is going to zoom in displace here.

25
00:01:43,920 --> 00:01:54,380
So now I can say a map does move camera camera up that let's run the application now.

26
00:01:54,720 --> 00:01:56,320
Let me show you the simulator.

27
00:01:57,610 --> 00:01:59,230
But here we have a problem.

28
00:01:59,230 --> 00:02:06,100
So you can see that the camera is too much zoomed in this place here that we cannot actually see what's

29
00:02:06,100 --> 00:02:07,190
going on here.

30
00:02:07,240 --> 00:02:09,260
So let's change this value here.

31
00:02:09,280 --> 00:02:11,640
Number 20 Let's send you to number five.

32
00:02:11,950 --> 00:02:14,810
OK Point Number five point zero.

33
00:02:14,890 --> 00:02:16,530
Let's run the application again.

34
00:02:16,660 --> 00:02:18,440
Let me show you the emulator.

35
00:02:18,550 --> 00:02:21,610
And by the way it is the shortcut to run the application here.

36
00:02:21,670 --> 00:02:27,040
You can actually hold down the control on your keyboard and then press on the letter or key on your

37
00:02:27,040 --> 00:02:27,650
keyboard.

38
00:02:27,820 --> 00:02:32,760
So now you can see that we have this Iceland here and the camera is in this place here.

39
00:02:32,860 --> 00:02:36,860
But the value at this time is five point zero F here.

40
00:02:36,940 --> 00:02:37,960
Right.

41
00:02:38,020 --> 00:02:38,690
So that's it.

42
00:02:38,830 --> 00:02:40,370
Let's go back to android studio.

43
00:02:40,440 --> 00:02:44,560
And now after this line of code let's add some more lines of code here.

44
00:02:44,570 --> 00:02:48,600
So now I want to add a marker to this place here.

45
00:02:48,820 --> 00:02:49,930
Iceland.

46
00:02:49,930 --> 00:02:53,630
So in order to do that we need to create a variable of type marshal options.

47
00:02:53,630 --> 00:02:57,710
So just they've been here Marchal options and the name of this variable is market options.

48
00:02:57,730 --> 00:03:03,810
It's I mean operator new market options so let's create an object of like market options semicolon and

49
00:03:03,850 --> 00:03:09,850
it is specified the position of this market option so just say in here multiple options that position

50
00:03:10,390 --> 00:03:12,060
the position is going to be Iceland.

51
00:03:12,100 --> 00:03:14,810
So just they've been here Iceland semicolon.

52
00:03:15,100 --> 00:03:19,050
And now let's specify the title of these market options here.

53
00:03:19,060 --> 00:03:27,030
So I can see multiple options that title Putu Cox you just type in here Welkom to Iceland.

54
00:03:27,200 --> 00:03:28,430
We'll come to Iceland.

55
00:03:29,480 --> 00:03:37,570
Semi-colon and let's add snippets to this market options so we can see market options that snippet to

56
00:03:37,570 --> 00:03:39,070
quotes and what I can say for example.

57
00:03:39,070 --> 00:03:46,150
Fantastic fantastic semi-colon.

58
00:03:46,240 --> 00:03:53,380
And finally we need to add this market options to the map so I can say map that at multiple options

59
00:03:53,740 --> 00:03:58,930
that are actually at mulcher and this and here and here we just need to pass the value of the market

60
00:03:58,930 --> 00:04:02,640
options so we have this value here multiple options semi-colon.

61
00:04:02,770 --> 00:04:05,200
Now let's run the application.

62
00:04:05,200 --> 00:04:06,690
Let me show you the emulator.

63
00:04:06,790 --> 00:04:11,090
So here you can see that this monitor here is actually added to this place here.

64
00:04:11,230 --> 00:04:15,130
If I click on it here you can see that the title is welcome to Iceland.

65
00:04:15,310 --> 00:04:17,600
And this snippet is fantastic.

66
00:04:17,920 --> 00:04:18,640
Right.

67
00:04:18,700 --> 00:04:19,490
So that's it.

68
00:04:19,780 --> 00:04:25,630
Let's go back to android studio and here after these lines of code that actually adds a marker to this

69
00:04:25,630 --> 00:04:26,870
place ice then.

70
00:04:26,980 --> 00:04:30,490
Now we're going to add actually more coats here.

71
00:04:30,910 --> 00:04:38,630
So now I want to create a circle around this location here inside our app on our map actually.

72
00:04:38,650 --> 00:04:40,650
So let's go back to our method here.

73
00:04:40,660 --> 00:04:45,850
Inside this maps activity class and below these lines of code that actually sets them market options

74
00:04:45,850 --> 00:04:47,620
here for this location.

75
00:04:47,780 --> 00:04:53,130
I can create a variable of type circle options and the name of this variable is circle options assigning

76
00:04:53,170 --> 00:05:00,100
operator new circle options semicolon So we created an object of type circle options and we assigned

77
00:05:00,130 --> 00:05:02,550
this object to this valuable circle options.

78
00:05:02,560 --> 00:05:09,690
So now I need to specify the center of the circle so the center of the circle is going to be this location.

79
00:05:09,700 --> 00:05:10,180
Iceland.

80
00:05:10,180 --> 00:05:21,810
So I can't say circle options that center and it is going to be Iceland semicolon and again circle options

81
00:05:22,110 --> 00:05:27,390
that radius so I'm going to specify the radius of this actually circle around this place.

82
00:05:27,480 --> 00:05:28,060
Iceland.

83
00:05:28,110 --> 00:05:32,270
So the radius is going to be free hundred which is actually double right.

84
00:05:32,460 --> 00:05:38,550
So we just need to really need to pass a double value but it is OK to pass an integer value here because

85
00:05:38,580 --> 00:05:40,740
it can be converted to a double value.

86
00:05:40,860 --> 00:05:41,540
OK.

87
00:05:41,760 --> 00:05:49,560
Radius and here and here I can specify this through width of this circle here around this place.

88
00:05:49,560 --> 00:05:53,460
Iceland so I can say circle options that stroke.

89
00:05:55,050 --> 00:06:00,920
So here it is going to be twenty point zero which is actually a float value right semicolon.

90
00:06:01,410 --> 00:06:08,130
And finally let's specify the color of the circle around this place circle options that actually sets

91
00:06:08,490 --> 00:06:15,560
that color excuse me that is 3 color structure color so the color is going to be yellow colored that

92
00:06:15,890 --> 00:06:19,810
yellow semi-colon.

93
00:06:19,880 --> 00:06:27,940
And finally we need to add this circle to the map so a map that at circle circle options.

94
00:06:29,060 --> 00:06:29,820
Semicolon.

95
00:06:29,930 --> 00:06:31,870
Let's run the application now.

96
00:06:32,120 --> 00:06:34,310
Let me show you the emulator.

97
00:06:34,310 --> 00:06:38,480
So here you can see that our application is running on the simulator.

98
00:06:38,690 --> 00:06:45,350
And here this is Iceland but we can't see this circle around this area because we must actually first

99
00:06:45,440 --> 00:06:47,200
zoom in this place here.

100
00:06:47,340 --> 00:06:48,460
In order to see the circle.

101
00:06:48,470 --> 00:06:54,200
So in order to zoom here just double click here on this Iceland here around this monitor here just double

102
00:06:54,260 --> 00:06:57,150
click here double click in order to zoom.

103
00:06:57,320 --> 00:07:02,690
And now you can see this actually the yellow circle around these marker here.

104
00:07:02,780 --> 00:07:03,830
Right.

105
00:07:03,830 --> 00:07:05,040
So that's it.

106
00:07:05,040 --> 00:07:07,290
And now you can see that the color is yellow.

107
00:07:07,310 --> 00:07:12,330
You can see that this track which is 20 and the radius is 300.

108
00:07:12,560 --> 00:07:16,030
If you want to you can actually change the value of this zoom in here.

109
00:07:16,130 --> 00:07:20,300
So let's go back 200 Studia insert is on the left here.

110
00:07:20,380 --> 00:07:23,360
We have specified this value number five point zero.

111
00:07:23,570 --> 00:07:27,510
So let's change this value to for example Number ten point zero.

112
00:07:27,560 --> 00:07:30,430
So let's change it to ten point zero F..

113
00:07:30,440 --> 00:07:32,160
Let's run the application again.

114
00:07:32,420 --> 00:07:35,730
Let me show you the emulator.

115
00:07:35,870 --> 00:07:39,760
So here you can see this yellow circle here around this area.

116
00:07:39,800 --> 00:07:44,710
Yet if I zoom in again here now you can see this yellow circle right.

117
00:07:44,870 --> 00:07:49,420
If you want to you can actually change this to for example number of 14.

118
00:07:49,520 --> 00:07:50,890
Let's run the map again.

119
00:07:50,930 --> 00:07:52,610
Let me show you the emulator.

120
00:07:54,670 --> 00:07:58,030
So now you can see this yellow circle here right.

121
00:07:58,150 --> 00:08:00,120
So that's it that's enough for this story.

122
00:08:00,160 --> 00:08:04,190
If you have any questions about the concepts that I taught you in this lesson.

123
00:08:04,330 --> 00:08:08,720
Please post the discussion in the course and then I'll do my best to answer all of your questions.

124
00:08:08,830 --> 00:08:10,020
Thank you very much for watching.

125
00:08:10,030 --> 00:08:11,540
And in the next tutorial.

