Created
October 17, 2012 14:53
-
-
Save taktamur/3905956 to your computer and use it in GitHub Desktop.
YMKMapViewの拡張
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - YMKMapViewを拡張 | |
// 「表示されている地図」の範囲を「YOLPのローカルサーチ」で探す場合、 | |
// 表示されているエリアの左下と右上の緯度経度が必要となるので、 | |
// YMKMapViewを拡張して取得できるようにする。 | |
@implementation YMKMapView(PMMapViewController) | |
// mapViewの「左下」の緯度経度を取得する | |
-(CLLocationCoordinate2D)leftBottomCoordinate{ | |
return [self convertPoint:CGPointMake(0,self.bounds.size.height) | |
toCoordinateFromView:self]; | |
} | |
// mapViewの「右上」の緯度経度を取得 | |
-(CLLocationCoordinate2D)rightTopCoordinate{ | |
return [self convertPoint:CGPointMake(self.bounds.size.width,0) | |
toCoordinateFromView:self]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment