代码改变世界
2012-03-26 09:58
java环境变量
阅读(283)
评论()
编辑
收藏
举报
-
- (void)locationManager:(CLLocationManager *)manager
-
didUpdateToLocation:(CLLocation *)newLocation
-
fromLocation:(CLLocation *)oldLocation
-
{
-
if (!gaocoder) {
-
gaocoder = [[MKReverseGeocoder alloc]initWithCoordinate:newLocation.coordinate];
-
gaocoder.delegate =self;
-
[gaocoder start];
-
}
-
-
showmapview.region=MKCoordinateRegionMake(self.bestloaction.coordinate, MKCoordinateSpanMake(0.005f, 0.005f));
-
showmapview.showsUserLocation=YES;
-
showmapview.zoomEnabled=NO;
-
-
if (!self.bestloaction)self.bestloaction=newLocation;
-
else if (newLocation.horizontalAccuracy<bestloaction.horizontalAccuracy)
-
self.bestloaction=newLocation;
-
-
latitudeString= [[NSString alloc] initWithFormat:@"%g",newLocation.coordinate.latitude];
-
-
-
NSLog(@"string one:%@",latitudeString);
-
[latitudeString release];
-
longitudeString = [[NSString alloc]initWithFormat:@"%g",newLocation.coordinate.longitude];
-
NSLog(@"string two:%@",longitudeString);
-
[longitudeString release];
-
-
-
-
}