/
309.srt
4706 lines (3436 loc) · 102 KB
/
309.srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:00.506 --> 00:00:09.666 A:middle
[ Silence ]
00:00:10.166 --> 00:00:11.176 A:middle
>> Aroon Pahwa: Good
afternoon everybody.
00:00:11.176 --> 00:00:11.516 A:middle
[ Applause ]
00:00:11.516 --> 00:00:21.216 A:middle
Thanks for coming here today to
Putting Map Kit in Perspective.
00:00:22.076 --> 00:00:24.826 A:middle
My name is Aroon Pahwa and I am
here to talk to you about some
00:00:24.826 --> 00:00:27.386 A:middle
of the new ways you can
look at Maps in iOS 7.
00:00:27.986 --> 00:00:33.556 A:middle
So last year with iOS 6 we
introduced an all new maps
00:00:33.556 --> 00:00:35.806 A:middle
application with
vector map rendering.
00:00:36.446 --> 00:00:38.486 A:middle
And along with that we
introduced a few new ways you
00:00:38.486 --> 00:00:39.526 A:middle
can interact with Maps.
00:00:39.526 --> 00:00:42.906 A:middle
We added the ability
to rotate the map,
00:00:44.006 --> 00:00:45.776 A:middle
as well as pitch
the map into 3D.
00:00:46.346 --> 00:00:47.946 A:middle
You get to see these
beautiful 3D buildings.
00:00:48.596 --> 00:00:52.126 A:middle
We also added the
ability to pan westward
00:00:52.126 --> 00:00:53.276 A:middle
across the Pacific Ocean.
00:00:53.726 --> 00:00:55.906 A:middle
You can just keep going forever
all the way around the world.
00:00:56.546 --> 00:00:59.986 A:middle
And to implement
printing support
00:00:59.986 --> 00:01:03.706 A:middle
in Maps we added the ability
to take static map snapshots.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:59.986 --> 00:01:03.706 A:middle
in Maps we added the ability
to take static map snapshots.
00:01:06.496 --> 00:01:09.226 A:middle
Now we had hundreds of millions
of users using the Maps.app
00:01:09.226 --> 00:01:12.066 A:middle
and when they left and
came to your app they found
00:01:12.066 --> 00:01:14.676 A:middle
that the Map Kit view
did not work the same.
00:01:15.696 --> 00:01:17.096 A:middle
They tried to rotate
it, it didn't work.
00:01:17.666 --> 00:01:19.326 A:middle
They tried to pitch
it and it didn't work.
00:01:19.376 --> 00:01:21.906 A:middle
And it's frustrating for them
and I'm sure it's frustrating
00:01:21.906 --> 00:01:24.026 A:middle
for you too because your
customers can't use the map the
00:01:24.026 --> 00:01:24.916 A:middle
way they do in the Maps.app.
00:01:25.966 --> 00:01:28.846 A:middle
So this year we brought all of
that to Map Kit and not only
00:01:28.846 --> 00:01:31.116 A:middle
that we brought the
whole thing to OS X.
00:01:32.536 --> 00:01:33.966 A:middle
So I'm really excited
to talk to you today
00:01:34.916 --> 00:01:37.706 A:middle
about how we make
that work in Map Kit.
00:01:38.236 --> 00:01:39.496 A:middle
So the first thing
I'm going to go
00:01:39.496 --> 00:01:43.346 A:middle
over is what do we
actually mean by 3D map?
00:01:45.196 --> 00:01:48.476 A:middle
After that I'm going to show
you how you can add perspective
00:01:48.476 --> 00:01:49.906 A:middle
views to your map.
00:01:51.196 --> 00:01:53.826 A:middle
Then I'm going to go over some
new API that we've introduced
00:01:53.826 --> 00:01:56.186 A:middle
to help you take
full advantage of 3D.
00:01:56.726 --> 00:01:59.666 A:middle
And lastly I'm going
to talk to you
00:01:59.666 --> 00:02:01.466 A:middle
about how you can
use the Snapshot API
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:01:59.666 --> 00:02:01.466 A:middle
about how you can
use the Snapshot API
00:02:01.466 --> 00:02:04.596 A:middle
that we've introduced to create
static snapshots of a map
00:02:04.746 --> 00:02:09.126 A:middle
in a preformat manner.
00:02:09.286 --> 00:02:10.455 A:middle
So what is a 3D map?
00:02:10.936 --> 00:02:13.966 A:middle
What does it mean
to call a map 3D?
00:02:14.896 --> 00:02:17.076 A:middle
When someone says map
usually they're talking
00:02:17.076 --> 00:02:18.016 A:middle
about something flat.
00:02:18.016 --> 00:02:20.416 A:middle
Maybe like a piece of paper you
roll up and put in your car.
00:02:21.006 --> 00:02:22.156 A:middle
It's got a bunch of roads on it.
00:02:23.386 --> 00:02:26.116 A:middle
So how do we take that
flat thing and make it 3D?
00:02:28.296 --> 00:02:30.616 A:middle
Well we start with the
same 2D map you're used to.
00:02:30.616 --> 00:02:31.436 A:middle
Here a picture of one.
00:02:31.436 --> 00:02:34.036 A:middle
North is at the top.
00:02:34.696 --> 00:02:38.106 A:middle
Then we add pitched
views of that map.
00:02:38.256 --> 00:02:41.226 A:middle
And on top of that now we can
add things like 3D buildings.
00:02:41.756 --> 00:02:44.276 A:middle
And the result is something
00:02:44.486 --> 00:02:46.666 A:middle
that is sometimes
referred to as 2.5D.
00:02:47.186 --> 00:02:50.426 A:middle
That's because what's really
going on here is we're looking
00:02:50.426 --> 00:02:53.936 A:middle
at the same 2D map you're used
to seeing in a 3D environment.
00:02:54.496 --> 00:02:57.576 A:middle
And that exactly how you should
conceptualize what's happening.
00:02:57.576 --> 00:02:59.386 A:middle
What we're doing is
we're looking at 2D map
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:03:00.046 --> 00:03:03.136 A:middle
in a 3D environment and
that allows us to move
00:03:03.136 --> 00:03:05.626 A:middle
around in a 3D environment
getting pitched views
00:03:05.626 --> 00:03:08.466 A:middle
and rotation, as well as,
putting 3D objects on top
00:03:08.466 --> 00:03:09.446 A:middle
of the map like these buildings.
00:03:09.446 --> 00:03:13.366 A:middle
So how do you get
around this new 3D map?
00:03:13.426 --> 00:03:15.666 A:middle
Well you're probably all
familiar with the Maps.app
00:03:15.666 --> 00:03:17.766 A:middle
and it works exactly
the same in Map Kit.
00:03:17.806 --> 00:03:19.766 A:middle
You can also use two
fingers to rotate the map
00:03:19.766 --> 00:03:20.686 A:middle
by rotating your fingers.
00:03:20.686 --> 00:03:22.916 A:middle
You can also use two
fingers and pan up
00:03:22.916 --> 00:03:23.846 A:middle
and down to pitch the map.
00:03:24.656 --> 00:03:28.126 A:middle
And in OS X we use all the
gestures you're used to using
00:03:28.126 --> 00:03:30.366 A:middle
with a track pad and if
you don't have a track pad
00:03:30.366 --> 00:03:32.696 A:middle
and you've got a mouse we've
added handy compass controls
00:03:32.696 --> 00:03:35.186 A:middle
and zoom controls so it's easy
to get around that way too.
00:03:36.816 --> 00:03:39.236 A:middle
And I know most of you use the
simulator to test your apps
00:03:39.236 --> 00:03:41.086 A:middle
so we've added the
ability to pitch and rotate
00:03:41.086 --> 00:03:42.166 A:middle
in the simulator, as well.
00:03:42.486 --> 00:03:44.066 A:middle
You can use these key
combinations up here,
00:03:44.066 --> 00:03:45.436 A:middle
now you can pitch and rotate.
00:03:45.836 --> 00:03:48.996 A:middle
Test your app, complete
functionality in the sim.
00:03:51.436 --> 00:03:54.886 A:middle
So how do you get these 3D
views in your Map Kit app?
00:03:56.306 --> 00:03:58.396 A:middle
It's basically three
things you need to do.
00:03:58.856 --> 00:04:01.396 A:middle
The first one is just
recompile with iOS 7 SDK.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:03:58.856 --> 00:04:01.396 A:middle
The first one is just
recompile with iOS 7 SDK.
00:04:01.396 --> 00:04:04.846 A:middle
You're going to find that
pitching and rotation just work.
00:04:04.846 --> 00:04:05.886 A:middle
They're on by default.
00:04:06.576 --> 00:04:09.616 A:middle
And for the most part your
app will probably just work.
00:04:09.706 --> 00:04:12.046 A:middle
But there are some changes
to the existing API behavior
00:04:12.046 --> 00:04:14.096 A:middle
that you should be aware
of and we're going to go
00:04:14.096 --> 00:04:16.166 A:middle
over the four major
areas of the MKMap API
00:04:16.166 --> 00:04:18.586 A:middle
that change a little
bit, you should be aware
00:04:18.586 --> 00:04:21.875 A:middle
of in case something
in your app breaks.
00:04:22.176 --> 00:04:25.666 A:middle
Lastly I'm going to go over a
new camera API we're introducing
00:04:25.666 --> 00:04:27.486 A:middle
that you should be
adopting in your apps
00:04:27.676 --> 00:04:28.986 A:middle
to take full advantage of 3D.
00:04:29.396 --> 00:04:32.736 A:middle
So I'm pretty sure you can
handle recompiling your app
00:04:32.736 --> 00:04:35.656 A:middle
so I'm just going to go ahead
and get started with adapting
00:04:35.656 --> 00:04:36.886 A:middle
to existing API changes.
00:04:37.986 --> 00:04:40.276 A:middle
So after you create
you MKMapView one
00:04:40.276 --> 00:04:41.796 A:middle
of the first things you're
probably doing is telling the
00:04:41.796 --> 00:04:43.786 A:middle
map what part of the world
that you want to see.
00:04:43.786 --> 00:04:46.676 A:middle
Here are the two APIs that
you're probably using.
00:04:47.076 --> 00:04:48.716 A:middle
The first one is
setVisibleMapRect
00:04:48.716 --> 00:04:50.086 A:middle
and the second one is setRegion.
00:04:50.676 --> 00:04:52.396 A:middle
Both of these take a rectangle
00:04:52.456 --> 00:04:54.106 A:middle
and tell the map
to just show it.
00:04:54.106 --> 00:04:56.666 A:middle
And this API behaves
exactly like it always has
00:04:56.666 --> 00:04:57.816 A:middle
in previous iOS releases.
00:04:58.166 --> 00:05:00.676 A:middle
It results in a 2D map
that's looking straight
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:04:58.166 --> 00:05:00.676 A:middle
It results in a 2D map
that's looking straight
00:05:00.676 --> 00:05:02.546 A:middle
down at the map with
no rotation.
00:05:02.546 --> 00:05:04.006 A:middle
So North is at the
top of your map view.
00:05:05.066 --> 00:05:07.646 A:middle
The difference in iOS 7
is now that we can pan
00:05:07.646 --> 00:05:09.606 A:middle
across the Pacific Ocean
it means we can pan
00:05:09.606 --> 00:05:13.716 A:middle
across the 180th Meridian;
this API will now returnRects
00:05:13.866 --> 00:05:15.916 A:middle
that span that as well, and
that's a little bit different
00:05:15.916 --> 00:05:17.136 A:middle
than in previous iOS releases.
00:05:17.136 --> 00:05:20.096 A:middle
So if you're doing math with
these rectangles that math needs
00:05:20.096 --> 00:05:22.936 A:middle
to handle a rectangle that's
spanning that meridian.
00:05:27.976 --> 00:05:31.936 A:middle
So here's an example of a
rectangle that you can now set
00:05:31.936 --> 00:05:34.236 A:middle
with these APIs that
spans the 180th meridian.
00:05:34.856 --> 00:05:36.676 A:middle
Here we have a
MKCoordinateRegion that's
00:05:36.676 --> 00:05:41.146 A:middle
looking directly at the
equator and the 108th Meridian;
00:05:41.146 --> 00:05:43.116 A:middle
that's the line that goes up
and down the Pacific Ocean.
00:05:43.346 --> 00:05:45.646 A:middle
And we have some
radius around it.
00:05:46.006 --> 00:05:48.396 A:middle
So in iOS 6 and before you would
have got an image like this
00:05:48.396 --> 00:05:49.846 A:middle
if you had tried to
set that in MKMapView.
00:05:50.386 --> 00:05:51.916 A:middle
We kind of got bumped
over and now we're looking
00:05:51.916 --> 00:05:52.966 A:middle
at North and South America.
00:05:53.746 --> 00:05:55.976 A:middle
But in iOS 7 we'll obey
the rectangle that you set
00:05:55.976 --> 00:05:57.706 A:middle
and now we're looking in the
middle of the Pacific Ocean.
00:05:57.706 --> 00:06:02.756 A:middle
Now the same two APIs
you can read from
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:05:57.706 --> 00:06:02.756 A:middle
Now the same two APIs
you can read from
00:06:02.756 --> 00:06:03.846 A:middle
and they'll turn a rectangle
00:06:03.846 --> 00:06:05.846 A:middle
and they behave a little
bit differently now
00:06:05.846 --> 00:06:06.536 A:middle
that we have pitching.
00:06:07.326 --> 00:06:10.346 A:middle
So here's a pitched and rotated
view of downtown San Francisco
00:06:11.126 --> 00:06:13.426 A:middle
and intuition tells me that you
can't really describe what we're
00:06:13.426 --> 00:06:14.596 A:middle
seeing here using a rectangle.
00:06:15.866 --> 00:06:16.836 A:middle
So let's see if that's true.
00:06:16.836 --> 00:06:18.606 A:middle
We can just wash
this view with blue.
00:06:19.016 --> 00:06:20.446 A:middle
Now let's zoom out
and take a look at it
00:06:20.676 --> 00:06:22.476 A:middle
and indeed it's not
a rectangle it's
00:06:22.476 --> 00:06:25.326 A:middle
like some chopped off
rectangle or triangle.
00:06:26.666 --> 00:06:29.296 A:middle
And so these APIs do the most
sensible thing they can do.
00:06:29.726 --> 00:06:32.606 A:middle
They return a rectangle that
contains the visible region.
00:06:33.476 --> 00:06:35.276 A:middle
That means it's now
an approximation
00:06:35.276 --> 00:06:38.066 A:middle
to what your map view is
showing when it's pitched.
00:06:39.296 --> 00:06:41.676 A:middle
The other difference is
they may return a rectangle
00:06:41.676 --> 00:06:44.016 A:middle
that spans 108th Meridian and
like I said you need to be able
00:06:44.016 --> 00:06:44.826 A:middle
to handle that in your app.
00:06:45.646 --> 00:06:47.876 A:middle
You may wonder, "Well what
am I going to use this thing
00:06:47.876 --> 00:06:49.706 A:middle
for if it doesn't actually
tell me what the map view
00:06:49.706 --> 00:06:50.106 A:middle
is showing?"
00:06:50.106 --> 00:06:54.156 A:middle
Well it turns out its really
easy to trim or filter the data
00:06:54.156 --> 00:06:56.106 A:middle
that you're going to show
on a map using a rectangle.
00:06:56.106 --> 00:06:57.796 A:middle
The math is very simple
and you're probably doing
00:06:57.796 --> 00:06:59.786 A:middle
that today already
if you're trying
00:06:59.786 --> 00:07:00.926 A:middle
to show a lot of
data on the map.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:06:59.786 --> 00:07:00.926 A:middle
to show a lot of
data on the map.
00:07:01.336 --> 00:07:04.086 A:middle
So you should continue
using this API to do that.
00:07:06.416 --> 00:07:08.396 A:middle
So there's one more
API to change what part
00:07:08.396 --> 00:07:10.116 A:middle
of the map is being
shown in your map view
00:07:10.116 --> 00:07:11.406 A:middle
and that's setCenterCoordinate.
00:07:12.356 --> 00:07:13.476 A:middle
In previous iOS releases
00:07:13.476 --> 00:07:16.866 A:middle
and in iOS 7 this returns the
coordinate that's at the center
00:07:16.866 --> 00:07:18.746 A:middle
of the screen or allows
you to set the coordinate
00:07:18.746 --> 00:07:22.036 A:middle
which should be visible at
the center of the screen.
00:07:22.036 --> 00:07:24.856 A:middle
And what that does is basically
simulate the pan gesture.
00:07:25.266 --> 00:07:28.066 A:middle
That means when you change this
property the zoom level won't
00:07:28.066 --> 00:07:31.246 A:middle
change and now on iOS 7
the rotation or the pitch
00:07:31.246 --> 00:07:32.936 A:middle
of the map won't change either.
00:07:36.086 --> 00:07:36.716 A:middle
Annotations.
00:07:37.596 --> 00:07:39.136 A:middle
The annotations are a great way
00:07:39.136 --> 00:07:40.756 A:middle
to describe a single
point on the map.
00:07:41.296 --> 00:07:44.186 A:middle
In iOS7 they're really
easy to use.
00:07:44.186 --> 00:07:45.356 A:middle
They continue to be easy to use.
00:07:45.746 --> 00:07:49.236 A:middle
That's because they stay
upright as the map rotates.
00:07:49.796 --> 00:07:53.726 A:middle
They also always face the
screen even as the map pitches.
00:07:54.116 --> 00:07:56.596 A:middle
And as you push them
into the background
00:07:56.596 --> 00:07:58.566 A:middle
when you're pitched they
always stay the same size.
00:07:59.136 --> 00:08:01.296 A:middle
To the artwork that you're
using will never be distorted
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:07:59.136 --> 00:08:01.296 A:middle
To the artwork that you're
using will never be distorted
00:08:01.296 --> 00:08:03.636 A:middle
and you don't have to
account for it changing size.
00:08:05.056 --> 00:08:06.046 A:middle
What's also handy is
00:08:06.046 --> 00:08:08.626 A:middle
that annotation views
always track the map.
00:08:08.626 --> 00:08:11.976 A:middle
That means as your user is
panning the map the annotation
00:08:11.976 --> 00:08:14.636 A:middle
view will be updated to
stay in the same position.
00:08:15.306 --> 00:08:18.126 A:middle
That means if you have
some UI that you want
00:08:18.226 --> 00:08:21.356 A:middle
to follow the map you should
try to add that as a sub-view
00:08:21.356 --> 00:08:23.436 A:middle
of the annotation view, or
just map it an annotation view
00:08:23.436 --> 00:08:24.516 A:middle
if that seems appropriate.
00:08:25.646 --> 00:08:28.886 A:middle
If you try to approximate
the way the map is moving
00:08:29.186 --> 00:08:31.426 A:middle
by capturing a gesture
recognizer
00:08:31.426 --> 00:08:32.796 A:middle
and overlaying your UI on top
00:08:32.796 --> 00:08:34.466 A:middle
of the map it's just not
going to work anymore.
00:08:35.256 --> 00:08:37.586 A:middle
When you pitch the
transformation is non-linear
00:08:37.586 --> 00:08:40.246 A:middle
so you can't kind
of interpolate that.
00:08:42.476 --> 00:08:45.076 A:middle
So in iOS annotation
views are still UIViews.
00:08:45.076 --> 00:08:46.756 A:middle
There's no changes there
so all the customization
00:08:46.756 --> 00:08:48.146 A:middle
that you're used to
doing continues to work.
00:08:48.146 --> 00:08:50.806 A:middle
And in iOS X we've
introduced them as NSViews
00:08:50.806 --> 00:08:52.086 A:middle
so if you're familiar
00:08:52.086 --> 00:08:54.696 A:middle
with NSViews you can use
annotation views right
00:08:54.696 --> 00:08:58.246 A:middle
out of the box.
00:08:58.406 --> 00:09:00.046 A:middle
There's a few small
changes to overlays.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:08:58.406 --> 00:09:00.046 A:middle
There's a few small
changes to overlays.
00:09:01.726 --> 00:09:04.146 A:middle
Overlays now take the
shortest path across the maps.
00:09:04.146 --> 00:09:07.576 A:middle
So if you have a polyline
and you give it two points;
00:09:07.576 --> 00:09:09.716 A:middle
one here in Los Angeles
and the other in Tokyo.
00:09:10.516 --> 00:09:11.746 A:middle
In previous iOS releases
00:09:11.746 --> 00:09:14.636 A:middle
that would have drawn a line
all the way across the U.S. then
00:09:14.636 --> 00:09:18.106 A:middle
across the Atlantic,
Africa, India, then China
00:09:18.326 --> 00:09:19.766 A:middle
and now finally on to Tokyo.
00:09:20.566 --> 00:09:21.926 A:middle
That doesn't really
make that much sense.
00:09:21.926 --> 00:09:24.916 A:middle
And now that we can look across
the Pacific Ocean we'll now draw
00:09:24.916 --> 00:09:26.336 A:middle
that polyline over
the Pacific Ocean.
00:09:27.066 --> 00:09:30.236 A:middle
In red what you're seeing here
is the new MKGeodesicPolyline
00:09:30.476 --> 00:09:32.446 A:middle
and those behave just
like normal polylines.
00:09:32.446 --> 00:09:33.686 A:middle
They're going to take
the short path, as well.
00:09:33.686 --> 00:09:38.446 A:middle
The other thing to note is
now that we have 3D buildings
00:09:39.576 --> 00:09:42.106 A:middle
when you pitch a view if there
are 3D buildings available those
00:09:42.106 --> 00:09:44.106 A:middle
are going to occlude
your overlays.
00:09:45.476 --> 00:09:46.436 A:middle
That's just something
to be aware of.
00:09:46.436 --> 00:09:48.176 A:middle
If you're presenting data that
doesn't really make sense,
00:09:48.176 --> 00:09:49.366 A:middle
if it's partially occluded,
00:09:49.946 --> 00:09:51.446 A:middle
something you should
be aware of.
00:09:54.676 --> 00:09:58.516 A:middle
So in the Maps.app we have
this feature; if you long press
00:09:58.516 --> 00:10:00.416 A:middle
on the map a purple
pins going to drop.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:09:58.516 --> 00:10:00.416 A:middle
on the map a purple
pins going to drop.
00:10:01.026 --> 00:10:02.716 A:middle
And that's really
handy for figuring
00:10:02.716 --> 00:10:05.026 A:middle
out what a random
address is on the map.
00:10:05.026 --> 00:10:07.446 A:middle
You can place it over a house
and you'll see the address
00:10:07.446 --> 00:10:08.246 A:middle
that that house is at.
00:10:09.596 --> 00:10:12.766 A:middle
Well to implement that the
Maps.app uses this first API I
00:10:12.766 --> 00:10:13.266 A:middle
listed here.
00:10:14.046 --> 00:10:16.006 A:middle
Convert point to
coordinate from view.
00:10:16.736 --> 00:10:18.806 A:middle
We take the point where the
user rested their finger
00:10:18.806 --> 00:10:21.186 A:middle
and we convert that into
a coordinate in the map.
00:10:22.046 --> 00:10:23.446 A:middle
From there you can
make an annotation
00:10:23.536 --> 00:10:24.796 A:middle
and drop an annotation
view on the map.
00:10:25.996 --> 00:10:28.706 A:middle
These other APIs are useful
for similar kinds of features.
00:10:30.236 --> 00:10:31.836 A:middle
Now in this image here
we can see the sky
00:10:31.836 --> 00:10:33.606 A:middle
and if the user places
their finger there
00:10:33.606 --> 00:10:34.866 A:middle
and long presses well,
00:10:35.656 --> 00:10:37.726 A:middle
what coordinate represents
a point of the sky?
00:10:37.796 --> 00:10:38.316 A:middle
There isn't one.
00:10:39.346 --> 00:10:42.296 A:middle
And so these APIs now have
to somehow indicate that.
00:10:42.866 --> 00:10:44.946 A:middle
Which means they can
return invalid values now
00:10:44.946 --> 00:10:46.216 A:middle
and that's something that
you have to be aware of.
00:10:47.666 --> 00:10:49.846 A:middle
So if you're using these
APIs be sure to check
00:10:49.846 --> 00:10:50.886 A:middle
for these invalid values.
00:10:51.856 --> 00:10:53.016 A:middle
Anywhere there's
a coordinate check
00:10:53.016 --> 00:10:56.616 A:middle
for KCLLocationCoordinate2D,