Right now i am working on Go开发者_开发问答ogle map. and for show pins on Google map i am using the area name and using Geo coder. so now i want to so zoomed Google map. so now how i set span using geo coder. please suggest.
Mike.
Mike, not exactly sure what you are asking... but I think you are asking how to zoom the map into a certain location. if that is the case.. here is some code to demo that by zooming into the good ol USA.
-(void) showUS
{
MKMapView *mapView = (MKMapView *)self.view;
MKCoordinateRegion region;
MKCoordinateSpan span;
span.longitudeDelta= 56.250000;
CLLocationCoordinate2D center;
center.latitude=38.959409;
center.longitude=-97.734375;
region.span=span;
region.center=center;
@try {
[mapView setRegion:region animated:YES];
}
@catch (NSException * e) {
}
}
精彩评论