- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我希望一旦单击“Mapa”之类的工具栏按钮,注释将显示在可见的 map 区域中。数据从 CoreData (Sqlite) 中获取。在 iPhone 模拟器中一切正常,但是当我在 iPhone 上测试应用程序时,单击工具栏上的按钮后只会显示一些图钉,我需要放大和缩小几次才能获得所有图钉。
第一张图片( http://www.aerodromoschile.com/IMG_0982.PNG )显示了放大几次之前的屏幕,第二张图片( http://www.aerodromoschile.com/IMG_0981.PNG )是我想从一开始就得到的
你可以帮帮我吗?这是代码
#import "MapViewController.h"
#import "AerodromoAppDelegate.h"
#import "Aerodromo.h"
#import "DetalleViewController.h"
#import <MapKit/MapKit.h>
@implementation mapViewController {
NSArray *locations;
}
@synthesize managedObjectContext;
@synthesize mapView;
- (void)viewDidLoad
{
[super viewDidLoad];
if (self.managedObjectContext == nil)
{
self.managedObjectContext = [(AerodromoAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext];
NSLog(@"After managedObjectContext: %@", self.managedObjectContext);
}
dispatch_async (dispatch_get_main_queue(), ^{
NSLog(@"Main Thread Code");
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Aerodromo" inManagedObjectContext:self.managedObjectContext];
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
[fetchRequest setEntity:entity];
NSError *error;
NSArray *foundObjects = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error];
if (foundObjects == nil) {
NSLog(@"FATAL_CORE_DATA_ERROR(error)");
return;
}
if (locations != nil) {
[self.mapView removeAnnotations:locations];
}
locations = foundObjects;
self.title = @"Mapa Online";
UIBarButtonItem *showuser = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showUser:)];
UIBarButtonItem *boton = [[UIBarButtonItem alloc] initWithTitle:@"Boton" style:UIBarButtonItemStyleDone target:self action:@selector(boton2:)];
NSArray *botones = [[NSArray alloc] initWithObjects:showuser, boton, nil];
self.navigationItem.rightBarButtonItems = botones;
mapView.delegate = self;
// Creamos una coordenada inicial.
CLLocationCoordinate2D initialLocation;
MKCoordinateRegion region = {{0.0f, 0.0f}, {0.0f, 0.0f}};
region.center = self.mapView.userLocation.location.coordinate;
initialLocation.latitude = self.mapView.userLocation.location.coordinate.latitude;
initialLocation.longitude= self.mapView.userLocation.location.coordinate.longitude;
// Esto situará el centro del mapa
region = MKCoordinateRegionMakeWithDistance(initialLocation, 50000, 50000);
[self.mapView setRegion:region animated:NO];
[self.mapView removeAnnotations:self.mapView.annotations];
NSLog(@"antotaciones = %d", locations.count);
[self.mapView addAnnotations:locations];
self.mapView.showsUserLocation=TRUE;
NSLog(@"fin Thread Code");
}); // termino del queqe
//[self.mapView addAnnotations:locations];
//[self updateLocations];
}
- (void)showUser:(id)sender{
NSLog(@"Boton1");
MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(self.mapView.userLocation.coordinate, 50000, 50000);
[self.mapView setRegion:[self.mapView regionThatFits:region] animated:NO];
}
- (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated
{
[self.mapView removeAnnotations:self.mapView.annotations];
[self.mapView addAnnotations:locations];
}
- (void)boton2:(id)sender{
NSLog(@"boton 2");
}
#pragma mark - MKMapViewDelegate
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
if ([annotation isKindOfClass:[Aerodromo class]]) {
static NSString *identifier = @"Aerodromo";
MKAnnotationView *annotationView = (MKPinAnnotationView *)[self.mapView dequeueReusableAnnotationViewWithIdentifier:identifier];
if (annotationView == nil) {
annotationView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:identifier];
annotationView.enabled = YES;
annotationView.canShowCallout = YES;
//annotationView.animatesDrop = NO;
annotationView.image = [UIImage imageNamed:@"aero3.png"];
//annotationView.pinColor = MKPinAnnotationColorGreen;
UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[rightButton addTarget:self action:@selector(showLocationDetails:) forControlEvents:UIControlEventTouchUpInside];
annotationView.rightCalloutAccessoryView = rightButton;
} else {
annotationView.annotation = annotation;
}
UIButton *button = (UIButton *)annotationView.rightCalloutAccessoryView;
button.tag = [locations indexOfObject:(Aerodromo *)annotation];
return annotationView;
}
return nil;
}
- (void)showLocationDetails:(UIButton *)button
{
NSLog(@"se apreto el boton");
//[self performSegueWithIdentifier:@"EditLocation" sender:button];
}
@end
- (void)viewDidLoad
{
[super viewDidLoad];
if (self.managedObjectContext == nil)
{
self.managedObjectContext = [(AerodromoAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext];
NSLog(@"After managedObjectContext: %@", self.managedObjectContext);
}
UIBarButtonItem *showuser = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showUser:)];
UIBarButtonItem *boton = [[UIBarButtonItem alloc] initWithTitle:@"Boton" style:UIBarButtonItemStyleDone target:self action:@selector(boton2:)];
NSArray *botones = [[NSArray alloc] initWithObjects:showuser, boton, nil];
self.navigationItem.rightBarButtonItems = botones;
self.title = @"Mapa Online";
mapView.delegate = self;
// Creamos una coordenada inicial.
CLLocationCoordinate2D initialLocation;
MKCoordinateRegion region = {{0.0f, 0.0f}, {0.0f, 0.0f}};
//region.center = //self.mapView.userLocation.location.coordinate;
initialLocation.latitude = -33.40;//self.mapView.userLocation.location.coordinate.latitude;
initialLocation.longitude= -70.54;//self.mapView.userLocation.location.coordinate.longitude;
// Esto situará el centro del mapa
region = MKCoordinateRegionMakeWithDistance(initialLocation, 50000, 50000);
[self.mapView setRegion:region animated:NO];
self.mapView.showsUserLocation=TRUE;
[self.mapView removeAnnotations:self.mapView.annotations];
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
//Anything that is not part of the UI
NSLog(@"ASync Thread Code");
NSMutableArray *tempLocations = [[NSMutableArray alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Aerodromo" inManagedObjectContext:self.managedObjectContext];
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
[fetchRequest setEntity:entity];
NSError *error;
NSArray *foundObjects = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error];
if (foundObjects == nil) {
NSLog(@"FATAL_CORE_DATA_ERROR(error)");
return;
}
MKPointAnnotation *location; //If you're not using MKPointAnnotation: replace it
for (location in foundObjects) {
[tempLocations addObject:location];
}
locations = tempLocations.copy;
dispatch_sync(dispatch_get_main_queue(), ^{
//Update the UI
NSLog(@"Getting back to the UI");
NSLog(@"antotaciones = %d, %@", locations.count, locations);
if (locations != nil) {
[self.mapView removeAnnotations:self.mapView.annotations];
[self.mapView addAnnotations:locations];
}
});
});
NSLog(@"fin Thread Code");
}
2013-07-16 12:10:18.007 Aerodromo[13922:1207] ASync Thread Code
2013-07-16 12:10:18.045 Aerodromo[13922:907] Getting back to the UI
2013-07-16 12:10:18.090 Aerodromo[13922:907] antotaciones = 351, (
"<Aerodromo: 0x1f0b0040> (entity: Aerodromo; id: 0x1f0ad580 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p1> ; data: {\n Ancho1 = 45;\n Ancho2 = \"\";\n Ancho3 = \"\";\n Ciudad = \"Arica \";\n Desig = SCAR;\n Elev = \"123 -166\";\n FrecTerr = IFR;\n FrecTorre = 1;\n Fuel = JP1;\n Fuel2 = \"AVGAS 100/130\";\n IdAd = 1;\n IndexRegion = 1;\n Larg1 = 2170;\n Larg2 = \"\";\n Larg3 = \"\";\n LatG = 18;\n LatM = 20;\n LatS = 55;\n Latitud = \"-18.349\";\n Limitaciones = \"\";\n Limitaciones2 = \"\";\n Limitaciones3 = \"\";\n LonG = 70;\n LonM = 20;\n LonS = 19;\n Longitud = \"-70.339\";\n Nombre = Chacalluta;\n NumeroPistas = 1;\n Pista1 = \"02-20\";\n Pista2 = \"\";\n Pista3 = \"\";\n RegionOrd = 15;\n Superficie = \"Hormig\\U00f3n\";\n Superficie2 = \"\";\n Superficie3 = \"\";\n Telefono = \"(58) 211116\";\n TieneMetar = 1;\n Uso = \"P\\U00daBLICO\";\n frec = \"<relationship fault: 0x21d8e110 'frec'>\";\n pdf = \"<relationship fault: 0x21d8e460 'pdf'>\";\n})",
"<Aerodromo: 0x1f0b0470> (entity: Aerodromo; id: 0x1f098d30 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p2> ; data: {\n Ancho1 = 23;\n Ancho2 = \"\";\n Ancho3 = \"\";\n Ciudad = \"Arica \";\n Desig = SCAE;\n Elev = 328;\n FrecTerr = 0;\n FrecTorre = 0;\n Fuel = \"No Tiene\";\n Fuel2 = \"\";\n IdAd = 2;\n IndexRegion = 1;\n Larg1 = 800;\n Larg2 = \"\";\n Larg3 = \"\";\n LatG = 18;\n LatM = 30;\n LatS = 36;\n Latitud = \"-18.51\";\n Limitaciones = \"\";\n Limitaciones2 = \"\";\n Limitaciones3 = \"\";\n LonG = 70;\n LonM = 17;\n LonS = 21;\n Longitud = \"-70.289\";\n Nombre = \"El Buitre\";\n NumeroPistas = 1;\n Pista1 = \"09-27\";\n Pista2 = \"\";\n Pista3 = \"\";\n RegionOrd = 15;\n Superficie = Asfalto;\n Superficie2 = \"\";\n Superficie3 = \"\";\n Telefono = \"(58) 201500 Anexo 31216\";\n TieneMetar = 0;\n Uso = MILITAR;\n frec = \"<relationship fault: 0x21e711e0 'frec'>\";\n pdf = \"<relationship fault: 0x21e715e0 'pdf'>\";\n})",
"<Aerodromo: 0x1f0b0870> (entity: Aerodromo; id: 0x1f0a09c0 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p3> ; data: {\n Ancho1 = 45;\n Ancho2 = \"\";\n Ancho3 = \"\";\n Ciudad = \"Iquique \";\n Desig = SCDA;\n Elev = \"97-157\";\n FrecTerr = \"VFR - IFR\";\n FrecTorre = 1;\n Fuel = JP1;\n Fuel2 = \"AVGAS 100/130\";\n IdAd = 3;\n IndexRegion = 2;\n Larg1 = 3350;\n Larg2 = \"\";\n Larg3 = \"\";\n LatG = 20;\n LatM = 32;\n LatS = 07;\n Latitud = \"-20.535\";\n Limitaciones = \"\";\n Limitaciones2 = \"\";\n Limitaciones3 = \"\";\n LonG = 70;\n LonM = 10;\n LonS = 53;\n Longitud = \"-70.181\";\n Nombre = \"Diego Aracena\";\n NumeroPistas = 1;\n Pista1 = \"19-01\";\n Pista2 = \"\";\n Pista3 = \"\";\n RegionOrd = 1;\n Superficie = \"Hormig\\U00f3n\";\n Superficie2 = \"\";\n Superficie3 = \"\";\n Telefono = \"(57)461200\";\n TieneMetar = 1;\n Uso = \"P\\U00daBLICO\";\n frec = \"<relationship fault: 0x21e71d00 'frec'>\";\n pdf = \"<relationship fault: 0x21e71e70 'pdf'>\";\n})",
"<Aerodromo: 0x1f0b0670> (entity: Aerodromo; id: 0x1f0a09a0 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p4> ; data: {\n Ancho1 = 20;\n Ancho2 = 20;\n Ancho3 = \"\";\n Ciudad = \"Pica \";\n Desig = SCKP;\n Elev = 12468;\n FrecTerr = 0;\n FrecTorre = 0;\n Fuel = \"No Tiene\";\n Fuel2 = \"\";\n IdAd = 4;\n IndexRegion = 2;\n Larg1 = 3200;\n Larg2 = 1034;\n Larg3 = \"\";\n LatG = 20;\n LatM = 44;\n LatS = 08;\n Latitud = \"-20.736\";\n Limitaciones = \"\";\n Limitaciones2 = \"\";\n Limitaciones3 = \"\";\n LonG = 68;\n LonM = 41;\n LonS = 42;\n Longitud = \"-68.69499999999999\";\n Nombre = Coposa;\n NumeroPistas = 2;\n Pista1 = \"17-35\";\n Pista2 = \"10-28\";\n Pista3 = \"\";\n RegionOrd = 1;\n Superficie = Asfalto;\n Superficie2 = Tierra;\n Superficie3 = \"\";\n Telefono = \"(57)417777\";\n TieneMetar = 0;\n Uso = PRIVADO;\n frec = \"<relationship fault: 0x21e72b80 'frec'>\";\n pdf = \"<relationship fault: 0x21e72f70 'pdf'>\";\n})",
"<Aerodromo: 0x1f0b0a50> (entity: Aerodromo; id: 0x1f0907c0 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p5> ; data: {\n Ancho1 = 30;\n Ancho2 = \"\";\n Ancho3 = \"\";\n Ciudad = \"Pozo Almonte\";\n Desig = SCNV;\n Elev = 3172;\n FrecTerr = 0;\n FrecTorre = 0;\n Fuel = \"No Tiene\";\n Fuel2 = \"\";\n IdAd = 5;\n IndexRegion = 2;\n Larg1 = 1077;\n Larg2 = \"\";\n Larg3 = \"\";\n LatG = 20;\n LatM = 44;\n LatS = \"05,4\";\n Latitud = \"-20.735\";\n Limitaciones = \"\";\n Limitaciones2 = \"\";\n Limitaciones3 = \"\";\n LonG = 69;\n LonM = 37;\n LonS = \"32,6\";\n Longitud = \"-69.626\";\n Nombre = \"Nueva Victoria\";\n NumeroPistas = 1;\n Pista1 = \"09-27\";\n Pista2 = \"\";\n Pista3 = \"\";\n RegionOrd = 1;\n Superficie = Vichufita;\n Superficie2 = \"\";\n Superficie3 = \"\";\n Telefono = \"(57) 413620\";\n TieneMetar = 0;\n Uso = PRIVADO;\n frec = \"<relationship fault: 0x21e739e0 'frec'>\";\n pdf = \"<relationship fault: 0x21e73800 'pdf'>\";\n})",
"<Aerodromo: 0x1f0b0c20> (entity: Aerodromo; id: 0x1f0920e0 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p6> ; data: {\n Ancho1 = 18;\n Ancho2 = \"\";\n Ancho3 = \"\";\n Ciudad = \"Antofagasta \";\n Desig = SCGU;\n Elev = 3347;\n FrecTerr = 0;\n FrecTorre = 0;\n Fuel = \"No Tiene\";\n Fuel2 = \"\";\n IdAd = 6;\n IndexRegion = 3;\n Larg1 = 1200;\n Larg2 = \"\";\n Larg3 = \"\";\n LatG = 24;\n LatM = 8;\n LatS = 11;\n Latitud = \"-24.136\";\n Limitaciones = \"\";\n Limitaciones2 = \"\";\n Limitaciones3 = \"\";\n LonG = 69;\n LonM = 49;\n LonS = 43;\n Longitud = \"-69.82899999999999\";\n Nombre = \"Aguas Blancas\";\n NumeroPistas = 1;\n Pista1 = \"13-31\";\n Pista2 = \"\";\n Pista3 = \"\";\n RegionOrd = 2;\n Superficie = Tierra;\n Superficie2 = \"\";\n Superficie3 = \"\";\n Telefono = \"(2) 2063737\";\n TieneMetar = 0;\n Uso = PRIVADO;\n frec = \"<relationship fault: 0x21e744d0 'frec'>\";\n pdf = \"<relationship fault: 0x21e74920 'pdf'>\";\n})",
"<Aerodromo: 0x1f0b1020> (entity: Aerodromo; id: 0x1f0a1970 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p7> ; data: {\n Ancho1 = 50;\n Ancho2 = \"\";\n Ancho3 = \"\";\n Ciudad = \"Antofagasta \";\n Desig = SCFA;\n Elev = \"352- 455\";\n FrecTerr = \"VFR - IFR\";\n FrecTorre = 1;\n Fuel = JP1;\n Fuel2 = \"AVGAS 100/130\";\n IdAd = 7;\n IndexRegion = 3;\n Larg1 = 2599;\n Larg2 = \"\";\n Larg3 = \"\";\n LatG = 23;\n LatM = 26;\n LatS = 40;\n Latitud = \"-23.444\";\n Limitaciones = \"\";\n Limitaciones2 = \"\";\n Limitaciones3 = \"\";\n LonG = 70;\n LonM = 26;\n LonS = 42;\n Longitud = \"-70.44499999999999\";\n Nombre = \"Cerro Moreno\";\n NumeroPistas = 1;\n Pista1 = \"01-19\";\n Pista2 = \"\";\n Pista3 = \"\";\n RegionOrd = 2;\n Superficie = Asfalto;\n Superficie2 = \"\";\n Superficie3 = \"\";\n Telefono = \"(55) 269077\";\n TieneMetar = 1;\n Uso = \"P\\U00daBLICO\";\n frec = \"<relationship fault: 0x21e75370 'frec'>\";\n pdf = \"<relationship fault: 0x21e75190 'pdf'>\";\n})",
"<Aerodromo: 0x1f0b1770> (entity: Aerodromo; id: 0x1f0a41c0 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p8> ; data: <fault>)",
"<Aerodromo: 0x1f0b1f00> (entity: Aerodromo; id: 0x1f0ad660 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p9> ; data: <fault>)",
"<Aerodromo: 0x1f0b11e0> (entity: Aerodromo; id: 0x1f071c50 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p10> ; data: <fault>)",
"<Aerodromo: 0x1f0b1b50> (entity: Aerodromo; id: 0x1f0a4930 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p11> ; data: <fault>)",
"<Aerodromo: 0x1f0b13c0> (entity: Aerodromo; id: 0x1f0a3190 <x-coredata://DEC0D4FE-F4A8-4739-9974-076071695E99/Aerodromo/p12> ; data: <fault>)",
最佳答案
您异步调度 addAnnotations。注释是 UI 的一部分,应该在主线程上。直到您缩放 map 才添加它们的原因是因为您的 regionWillChangeAnimated
代码。当您缩放 iPhone 上的异步调度完成时,但尚未在 viewDidLoad
中添加注释时完成。 .
要解决您的 GCD 问题:
在您的 viewDidLoad
做这样的事情:
-(void)viewDidLoad {
//Do UI stuff here:
//the mapView setup
//Region set
//and any other UI like: UILabels, UIbuttons etc.
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
//So now we start the async part:
dispatch_async(queue, ^{
//Anything that is not part of the UI
//Get your data for the annotations
//And now get back to the main_queue sync:
dispatch_sync(dispatch_get_main_queue(), ^{
locations = foundObjects; //As in your code
//Update the UI
NSLog(@"Getting back to the UI");
if (locations != nil) {
[self.mapView removeAnnotations:self.mapView.annotations]; //mapView.annotations to remove all...
[self.mapView addAnnotations:locations];
}
});
});
NSLog(@"End of viewDidLoad");
}
[self.mapView addAnnotations:locations];
在您的
locations
之前数组完成。
regionWillChangeAnimated
来完成当使用您的
setRegion:region
将 map 调整到用户位置时.
NSMutableArray *tempLocations = [[NSMutableArray alloc] init];
//Do your fetchRequest
//Then do the following, however I don't know exactly as what your `locations` are stored so you might need to change it a bit:
//I believe your annotations are kind of a Aerodromo class? So then:
for (Aerodromo *aerodromoAnn in fetchedObjects) {
[tempLocations addObject:aerodromoAnn];
}
/
//Then update your original locations array:
locations = tempLocations.copy;
//update the main queue again
关于sqlite - MapKit:在iPhone中缩放 map 之前不会显示注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17641040/
我想在我的应用程序中显示 map 上两点之间的点对点路线。我正在使用 MKDirectionsRequest为此。我试图找到浦那到孟买之间的路线。我收到一个错误作为响应。 错误消息: Error Do
我想我可能在 iOS 6 的 mapkit API 中发现了一个错误,但由于我仍然认为自己是新手,我想我会在这里查看是否有人能指出我可能做错的事情。 我有一个应用程序已经工作了几个星期,其中有一个 m
这是我的第一个程序。而且,我正在实现 MapKit。以下是代码: import UIKit import MapKit class ViewController: UIViewController {
如何从 MapkitView 获取当前可见叠加层的列表(数组)? 背景 - 例如,我想在我的 mapkitview 上显示指向某些覆盖类型中心的方向箭头,但是如何获得可见的箭头?我看似乎没有办法做到这
我使用了 Apples WWDC 2017 的项目 tandm - 237“Mapkit 中的新功能”。 已经有一个带数组的data.plist命名的自行车和额外的词典有四个项目(键:值 - 对)。
我正在使用 iOS 11 集群,它工作得很好,基本上你只需要将标识符添加到 MKAnnotationView 的 clusteringIdentifier 属性。 一切正常,但我有一个问题,当用户从
我有一个MKMapView,在顶部有一个UISearchBar,我希望用户能够键入一个地址,并找到该地址并在其上放一个别针。我不知道如何将地址字符串转换为经度和纬度,因此我可以创建一个CLLocati
我想在 map 上画一条路线。 但不使用委托(delegate)的结构。 struct MapView : UIViewRepresentable { } func mapView(_ mapView
绘制的折线显示在建筑物下方。 如何使折线位于所有图层的顶部 请建议 将折线添加为 var coordinates = locationsArrToAdd.map({ (location: CLL
我有一个简单的 Mac 应用程序,不打算用于任何类型的分发;只是个人使用。该应用程序是 NSWindow其中包含一个 MKMapView .由于我没有 Mac 开发人员帐户,也不想要(请参阅“仅供个人
这是一个非常简单的问题。在 MapKit JS 中,如何将注释设置为选中的注释? 我已经在 map View 上有了注释并且可以访问我想要选择的注释。我觉得应该有一个类似于 MapKit 的方法(不是
我可以在我的应用程序中使用 Google map 街景吗? 最佳答案 不。 [填充字符以克服可疑的最小值] 关于xcode - MapKit 是否允许街景?,我们在Stack Overflow上找到一
我有一个功能,可以将注释放大到 map 上的一半,以及用户的位置,这样两者都可以在屏幕上看到。是否有显示其“内容”的注释方法,即模拟按下它?它在放大后立即弹出是理想的选择。 提前致谢。 最佳答案 您可
在我的应用程序中,我添加了很多引脚,并在 viewForAnnotaion 中,我在 MKPinAnnotaionView 上设置了 animatesDrop=TRUE。问题是,当有 200 多个引脚
我已经为此苦苦挣扎了几天,我什至重写了一半的代码来尝试另一种方式。 我从 csv 导入了注释,并用图 block 和副标题放置在 map 上,我徒劳地尝试添加一个标签来公开按钮,以便我可以看到点击了哪
我按照本教程制作了我的第一个应用程序: http://icodeblog.com/2009/12/21/introduction-to-mapkit-in-iphone-os-3-0/ 我真的很想知道
我是 iPhone 开发新手。我在 map 上添加了注释。我能够在 didSelectAnnotationView() 中捕获注释上的点击事件。但我想在用户点击注释时更改注释的图像。 最佳答案 设置图
所以我的 map 上散布了一堆注释...一切都很漂亮。现在我需要能够设置 map 的位置和缩放,以便它们完美契合。我怎样才能做到这一点? 最佳答案 来自苹果论坛... - (void)recenter
我是 iPhone 版 MapKit 的新手,尝试实现此功能,由于某种原因我看不到当前位置蓝点,其他人也有这个问题吗??? #import "DetailMapViewController.h" #i
我有一张显示多个注释的 map 。我想模仿“照片”内置应用程序(iOS 4)上“位置”选项卡的行为,其中当用户更改缩放级别时,注释会自动连接在一起或分开。 我该怎么做? 谢谢! 最佳答案 “照片”应用
我是一名优秀的程序员,十分优秀!