0
votes
-(void) setTheMapViewRegionBasedonCurrentAnchorandDistance
{
    //PD([BNUtilitiesQuick MaxDistanceOnSearch]);
    //self.theMapView.centerCoordinate = [cachedProperties singleton].currentAnchor.coordinate;
    //self.theMapView.region.span.longitudeDelta=[BNUtilitiesQuick MaxDistanceOnSearch]*safetyMarginForMap; 
    double ratio = self.theMapView.frame.size.height/self.theMapView.frame.size.width;
    //double ratio = self.theMapView.visibleMapRect.size.height/self.theMapView.visibleMapRect.size.width;
    PD([BNUtilitiesQuick MaxDistanceOnSearch]);
    double distanceFromEastAndWestShyouldBe = [BNUtilitiesQuick MaxDistanceOnSearch]*ratioBetweenEastWestToDistanceFilter;
    PD(distanceFromEastAndWestShyouldBe);
    self.theMapView.region = MKCoordinateRegionMakeWithDistance([cachedProperties singleton].mapCenterLocation.coordinate,distanceFromEastAndWestShyouldBe, distanceFromEastAndWestShyouldBe);
    PD(self.DistanceBetweenWestandEast);
    PD(ratio);
}

Look at that code. I am setting the MKMapview region to the number of distanceFromEastAndWestShyouldBe. The output is:

    2012-08-10 11:30:13.789 BadgerNew[15438:17003] <0x874d0b0 GoogleMap.m:(394)> [BNUtilitiesQuick MaxDistanceOnSearch]: 193.690170
2012-08-10 11:30:13.789 BadgerNew[15438:17003] <0x874d0b0 GoogleMap.m:(396)> distanceFromEastAndWestShyouldBe: 464.856409
2012-08-10 11:30:13.790 BadgerNew[15438:17003] <0x874d0b0 GoogleMap.m:(398)> self.DistanceBetweenWestandEast: 761.369705
2012-08-10 11:30:21.329 BadgerNew[15438:17003] <0x874d0b0 GoogleMap.m:(399)> ratio: 1.437500

Basically I am setting the map to have 464 m width and the map width is 761 m instead.

Ratio between height and width of MKMapview is 1.43. It doesn't really matter because I use the smaller number for both latitude and longitude.

The code to compute actual difference between east and west in MKMapview is:

-(double)DistanceBetweenWestandEast     
{
    CLLocationDegrees longitudeDelta=self.theMapView.region.span.longitudeDelta;
    double distanceeastwest = longitudeDelta * MetersIn1DegreeofEarth;
    return distanceeastwest;    
}

with

#define MetersIn1DegreeofEarth 110882.5

defined somewhere else

A work around is simply to divide by 1.6 before changing the mapview region. However, I want to know why it's off in the first place.

2

2 Answers

1
votes

The distance between lines of longitude varies with the latitude. At the equator one degree of longitude is ~111km but by 75 degrees north or south one degree of longitude is ~29km. Your calculation for eastwestdistance assumes the view is on the equator. Try using CLLocation's distanceFromLocation that will take the latitude into account. You'll need two points. Center-longitudeDelta/2 and center+longitudeDelta/2

0
votes

I found out what the problem is:

I wrote this code:

  for (int i=100;i<10000;i=i*1.1)
    {
        distanceWereInputing = i;
        self.theMapView.region = MKCoordinateRegionMakeWithDistance([cachedProperties singleton].mapCenterLocation.coordinate,distanceWereInputing, distanceWereInputing);
        PD(distanceWereInputing);
        PD(self.DistanceBetweenWestandEast);
        PD(self.DistanceBetweenWestandEast/distanceWereInputing);
    }

This is the result:

2012-08-10 12:33:33.935 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(394)> [BNUtilitiesQuick MaxDistanceOnSearch]: 193.690170
2012-08-10 12:33:33.935 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(396)> distanceFromEastAndWestShyouldBe: 464.856409
2012-08-10 12:33:50.500 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 100.000000
2012-08-10 12:33:51.740 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 95.171213
2012-08-10 12:33:54.042 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 0.951712
2012-08-10 12:34:02.613 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 110.000000
2012-08-10 12:34:02.613 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 190.342426
2012-08-10 12:34:02.614 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.730386
2012-08-10 12:34:02.614 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 121.000000
2012-08-10 12:34:02.614 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 190.342426
2012-08-10 12:34:02.614 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.573078
2012-08-10 12:34:02.615 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 133.000000
2012-08-10 12:34:02.615 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 190.342426
2012-08-10 12:34:02.615 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.431146
2012-08-10 12:34:02.616 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 146.000000
2012-08-10 12:34:02.620 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 190.342426
2012-08-10 12:34:02.620 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.303715
2012-08-10 12:34:02.621 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 160.000000
2012-08-10 12:34:02.621 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 190.342426
2012-08-10 12:34:02.621 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.189640
2012-08-10 12:34:02.622 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 176.000000
2012-08-10 12:34:02.622 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 190.342426
2012-08-10 12:34:02.633 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.081491
2012-08-10 12:34:02.635 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 193.000000
2012-08-10 12:34:02.635 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 190.342426
2012-08-10 12:34:02.635 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 0.986230
2012-08-10 12:34:02.636 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 212.000000
2012-08-10 12:34:02.636 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 380.684853
2012-08-10 12:34:02.636 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.795683
2012-08-10 12:34:02.636 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 233.000000
2012-08-10 12:34:02.667 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 380.684853
2012-08-10 12:34:02.667 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.633841
2012-08-10 12:34:02.668 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 256.000000
2012-08-10 12:34:02.668 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 380.684853
2012-08-10 12:34:02.668 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.487050
2012-08-10 12:34:02.668 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 281.000000
2012-08-10 12:34:02.669 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 380.684853
2012-08-10 12:34:02.669 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.354750
2012-08-10 12:34:02.669 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 309.000000
2012-08-10 12:34:02.670 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 380.684853
2012-08-10 12:34:02.670 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.231990
2012-08-10 12:34:02.671 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 339.000000
2012-08-10 12:34:02.671 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 380.684853
2012-08-10 12:34:02.685 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.122964
2012-08-10 12:34:02.686 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 372.000000
2012-08-10 12:34:02.686 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 380.684853
2012-08-10 12:34:02.686 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.023346
2012-08-10 12:34:02.687 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 409.000000
2012-08-10 12:34:02.687 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 761.369705
2012-08-10 12:34:02.687 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.861540
2012-08-10 12:34:02.687 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 449.000000
2012-08-10 12:34:02.688 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 761.369705
2012-08-10 12:34:02.688 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.695701
2012-08-10 12:34:02.688 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 493.000000
2012-08-10 12:34:02.688 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 761.369705
2012-08-10 12:34:02.689 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.544360
2012-08-10 12:34:02.689 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 542.000000
2012-08-10 12:34:02.689 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 761.369705
2012-08-10 12:34:02.689 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.404741
2012-08-10 12:34:02.690 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 596.000000
2012-08-10 12:34:02.690 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 761.369705
2012-08-10 12:34:02.690 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.277466
2012-08-10 12:34:02.691 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 655.000000
2012-08-10 12:34:02.691 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 761.369705
2012-08-10 12:34:02.691 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.162396
2012-08-10 12:34:02.692 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 720.000000
2012-08-10 12:34:02.692 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 761.369705
2012-08-10 12:34:02.692 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.057458
2012-08-10 12:34:02.692 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 792.000000
2012-08-10 12:34:02.693 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 1522.739410
2012-08-10 12:34:02.693 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.922651
2012-08-10 12:34:02.693 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 871.000000
2012-08-10 12:34:02.693 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 1522.739410
2012-08-10 12:34:02.694 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.748266
2012-08-10 12:34:02.694 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 958.000000
2012-08-10 12:34:02.694 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 1522.739410
2012-08-10 12:34:02.694 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.589498
2012-08-10 12:34:02.695 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 1053.000000
2012-08-10 12:34:02.695 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 1522.739410
2012-08-10 12:34:02.695 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.446096
2012-08-10 12:34:02.695 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 1158.000000
2012-08-10 12:34:02.703 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 1522.739410
2012-08-10 12:34:02.703 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.314974
2012-08-10 12:34:02.704 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 1273.000000
2012-08-10 12:34:02.704 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 1522.739410
2012-08-10 12:34:02.704 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.196182
2012-08-10 12:34:02.705 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 1400.000000
2012-08-10 12:34:02.705 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 1522.739410
2012-08-10 12:34:02.705 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.087671
2012-08-10 12:34:02.706 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 1540.000000
2012-08-10 12:34:02.706 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 3045.478821
2012-08-10 12:34:02.706 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.977584
2012-08-10 12:34:02.707 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 1694.000000
2012-08-10 12:34:02.707 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 3045.478821
2012-08-10 12:34:02.707 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.797803
2012-08-10 12:34:02.707 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 1863.000000
2012-08-10 12:34:02.708 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 3045.478821
2012-08-10 12:34:02.708 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.634718
2012-08-10 12:34:02.708 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 2049.000000
2012-08-10 12:34:02.708 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 3045.478821
2012-08-10 12:34:02.709 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.486324
2012-08-10 12:34:02.709 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 2253.000000
2012-08-10 12:34:02.709 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 3045.478821
2012-08-10 12:34:02.710 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.351744
2012-08-10 12:34:02.710 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 2478.000000
2012-08-10 12:34:02.710 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 3045.478821
2012-08-10 12:34:02.710 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.229007
2012-08-10 12:34:02.711 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 2725.000000
2012-08-10 12:34:02.711 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 3045.478821
2012-08-10 12:34:02.711 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.117607
2012-08-10 12:34:02.712 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 2997.000000
2012-08-10 12:34:02.712 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 3045.478821
2012-08-10 12:34:02.712 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.016176
2012-08-10 12:34:02.713 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 3296.000000
2012-08-10 12:34:02.713 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 6090.957642
2012-08-10 12:34:02.713 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.847985
2012-08-10 12:34:02.714 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 3625.000000
2012-08-10 12:34:02.714 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 6090.957642
2012-08-10 12:34:02.714 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.680264
2012-08-10 12:34:02.714 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 3987.000000
2012-08-10 12:34:02.715 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 6090.957642
2012-08-10 12:34:02.715 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.527704
2012-08-10 12:34:02.715 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 4385.000000
2012-08-10 12:34:02.715 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 6090.957642
2012-08-10 12:34:02.716 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.389044
2012-08-10 12:34:02.716 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 4823.000000
2012-08-10 12:34:02.716 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 6090.957642
2012-08-10 12:34:02.716 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.262898
2012-08-10 12:34:02.717 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 5305.000000
2012-08-10 12:34:02.717 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 6090.957642
2012-08-10 12:34:02.717 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.148154
2012-08-10 12:34:02.718 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 5835.000000
2012-08-10 12:34:02.718 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 6090.957642
2012-08-10 12:34:02.718 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.043866
2012-08-10 12:34:02.719 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 6418.000000
2012-08-10 12:34:02.719 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 12181.915283
2012-08-10 12:34:02.719 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.898086
2012-08-10 12:34:02.719 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 7059.000000
2012-08-10 12:34:02.720 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 12181.915283
2012-08-10 12:34:02.720 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.725728
2012-08-10 12:34:02.720 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 7764.000000
2012-08-10 12:34:02.720 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 12181.915283
2012-08-10 12:34:02.721 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.569026
2012-08-10 12:34:02.721 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 8540.000000
2012-08-10 12:34:02.721 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 12181.915283
2012-08-10 12:34:02.721 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.426454
2012-08-10 12:34:02.722 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(403)> distanceWereInputing: 9394.000000
2012-08-10 12:34:02.722 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(404)> self.DistanceBetweenWestandEast: 12181.915283
2012-08-10 12:34:02.722 BadgerNew[16754:17003] <0x88b79b0 GoogleMap.m:(405)> self.DistanceBetweenWestandEast/distanceWereInputing: 1.296776

So it looks like Google Zoom level can only take certain value. That's why the ratio between what we input and the actual east west distance vary from 1.7 to .95.

So I just take the average 1.3 and use that when changing MKMapview size.