0

使用以下开源 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 个角的位置?

4

1 回答 1

0

你必须给自己写一个这样的方法:

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

其余3个点,用东南、西南、西北,同上。

于 2013-03-19T13:00:01.647 回答