Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Renamed location to coordinate per MKAnnotation.coordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Mar 4, 2015
1 parent 2cc7eff commit 1a75453
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ios/app/MBXAnnotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

@interface MBXAnnotation : UIImageView

@property (assign) CLLocationCoordinate2D location;
@property (assign) CLLocationCoordinate2D coordinate;

@end
4 changes: 2 additions & 2 deletions ios/app/MBXViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ - (void)viewDidAppear:(BOOL)animated
[feature[@"geometry"][@"coordinates"][0] doubleValue]);
CGPoint p = [self.mapView convertCoordinate:c toPointToView:self.mapView];
MBXAnnotation *ann = [[MBXAnnotation alloc] initWithImage:self.pin];
ann.location = c;
ann.coordinate = c;
ann.center = p;
[ann addGestureRecognizer:self.tapRecognizer];
[self.mapView.glView addSubview:ann];
Expand Down Expand Up @@ -157,7 +157,7 @@ - (void)refresh
self.mapView.centerCoordinate.longitude != self.lastCenter.longitude ||
self.mapView.zoomLevel != self.lastZoom) {
for (MBXAnnotation *ann in self.features) {
CGPoint p = [self.mapView convertCoordinate:ann.location toPointToView:self.mapView];
CGPoint p = [self.mapView convertCoordinate:ann.coordinate toPointToView:self.mapView];
if (CGRectContainsPoint(self.mapView.bounds, p)) {
ann.center = p;
[ann setHidden:NO];
Expand Down

0 comments on commit 1a75453

Please sign in to comment.