-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKMLPoint.m
41 lines (31 loc) · 843 Bytes
/
KMLPoint.m
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
//
// KMLPoint.m
// KMLViewer
//
// Created by Mojtaba Cazi on 2/27/18.
//
#import "KMLPoint.h"
#import "kml_com.h"
@implementation KMLPoint
@synthesize point;
- (void)endCoordinates {
flags.inCoords = NO;
CLLocationCoordinate2D *points = NULL;
NSUInteger len = 0;
strToCoords(accum, &points, &len);
if (len == 1) {
point = points[0];
}
free(points);
[self clearString];
}
- (MKShape *)mapkitShape {
// KMLPoint corresponds to MKPointAnnotation
MKPointAnnotation *annotation = [[MKPointAnnotation alloc] init];
annotation.coordinate = point;
return annotation;
}
// KMLPoint does not override MKOverlayPathRenderer: because there is no such
// thing as an overlay view for a point. They use MKAnnotationViews which
// are vended by the KMLPlacemark class.
@end