Cocoa touch ios地图-使用纬度和经度点在ios地图上创建视图
我在ios地图上使用pin点和线定位位置现在如何在该位置创建视图。Cocoa touch ios地图-使用纬度和经度点在ios地图上创建视图,cocoa-touch,ios4,google-maps-api-3,ios6,Cocoa Touch,Ios4,Google Maps Api 3,Ios6,我在ios地图上使用pin点和线定位位置现在如何在该位置创建视图。 在上图中,我使用pin和线条定位了这些位置。现在,我想在定位位置内创建一个视图。如何才能做到这一点。请有人帮我解决这个问题。屏幕上有注释。注释是纬度和拉格尼特值 NSArray *data = [root objectForKey:@"data"]; for (NSArray *row in data) { NSNumber * latitude = [[row objectAtIndex:22]obje
在上图中,我使用pin和线条定位了这些位置。现在,我想在定位位置内创建一个视图。
如何才能做到这一点。请有人帮我解决这个问题。屏幕上有注释。注释是纬度和拉格尼特值
NSArray *data = [root objectForKey:@"data"];
for (NSArray *row in data) {
NSNumber * latitude = [[row objectAtIndex:22]objectAtIndex:1];
NSNumber * longitude = [[row objectAtIndex:22]objectAtIndex:2];
NSString * crimeDescription = [row objectAtIndex:18];
NSString * address = [row objectAtIndex:14];
CLLocationCoordinate2D coordinate;
coordinate.latitude = latitude.doubleValue;
coordinate.longitude = longitude.doubleValue;
MyLocation *annotation = [[MyLocation alloc] initWithName:crimeDescription address:address coordinate:coordinate] ;
[_mapView addAnnotation:annotation];
}
它可以帮助你
1.