Question

Using following open source Route Me app I am loading 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

It would be great if there is a method in RMMapContents that lets me get maps 4 corners as CLLocationCoordinate2D? There is a

- (RMSphericalTrapezium) latitudeLongitudeBoundingBox; 

How do I get the 4 corner location from above method?

Was it helpful?

Solution

You have to write yourself such a method:

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

The remaining 3 points, use southeast, southwest and northwest, analog to above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top