如何找到路线上加载的地图瓷砖边界开源图?

时间:2013-03-18 20:26:12

标签: cocoa-touch gps cllocationmanager route-me

使用以下开源路由我应用程序我正在加载Maptiles

mapview = [[RMMapView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 460.0f)];
[mapview setBackgroundColor:[UIColor whiteColor]];
mapview.delegate = self;

id <RMTileSource> tileSource = [[[RMDBMapSource alloc] initWithPath:"@tilefile.db"] autorelease];

RMMapContents *rmcontents = [[RMMapContents alloc] initWithView:mapview tilesource:tileSource]; 
[self.view addSubview:mapview];//attached to mapview

如果RMMapContents中有一个方法可以让我将地图4个角作为CLLocationCoordinate2D,那会很棒吗?有一个

- (RMSphericalTrapezium) latitudeLongitudeBoundingBox; 

如何从上方获取4角位置?

1 个答案:

答案 0 :(得分:0)

你必须自己写一个方法:

RMSphericalTrapezium trap;
CLLocationCoordinate2D nePoint = CLLocationCoordinate2DMake(
    trap.northeast.latitude,
    trap.northeast.longitude);

其余3个点,使用东南,西南和西北,类似于上面。