0

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?

user914425
  • 16,303
  • 4
  • 30
  • 41

1 Answers1

0

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.

AlexWien
  • 28,470
  • 6
  • 53
  • 83