标签: ios6-maps

iOS6地图,在我的所有地图上都没有细节披露按钮(蓝色雪佛龙)!如何取回它

我的理解是移动到iOS 6地图没有问题.但由于某种原因,详细信息披露按钮现在在我的地图App中丢失.有没有办法让这个回来.哇,完全出乎意料.这已经工作多年了,所以所有代表都很好.

#pragma mark MKMapViewDelegate
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation {

MKPinAnnotationView *pin = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"REUSEME"] autorelease];
UIButton *button = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];

if ([annotation isKindOfClass:[MKUserLocation class]]) {
    pin.animatesDrop = YES;
    return nil;
} else {
    [pin setPinColor:MKPinAnnotationColorGreen];
}

pin.rightCalloutAccessoryView = button;
pin.animatesDrop = YES;
pin.canShowCallout = YES;

return pin;
}
Run Code Online (Sandbox Code Playgroud)

iphone mapkit ios6 ios6-maps

5
推荐指数
1
解决办法
1770
查看次数

iOS 6使用没有UIWebView的Google地图

iOS6开发中是否有使用Google地图的原生解决方案?我们不要假设.UIWebView

您如何看待开发人员是否会使用Apple地图,因为他们不想使用UIWebView

google-maps mkmapview ios ios6 ios6-maps

5
推荐指数
1
解决办法
979
查看次数

IOS 6 mapview中缩放级别的无差异行为

我一直在使用以下代码缩放地图视图,以便所有注释将以最佳缩放级别同时显示在视图中.但在IOS 6中,缩放级别似乎存在一些问题.测试几个案例,我发现1.如果联系人在美国,当加载地图时,它会缩放到其他位置.2.英国地区的缩放级别似乎是正确的(据我测试过).3.当我包括来自英国和美国的联系人时,英国的联系人会得到正确的缩放,但美国的联系人不在视线范围内.但轻微滑动将确保所有触点都适合视图并正确缩放.

-(void)zoomToFitMapAnnotations:(MKMapView*)mapViews insideArray:(NSArray*)anAnnotationArray
{ 
if([mapViews.annotations count] == 0) return;

CLLocationCoordinate2D topLeftCoord;
topLeftCoord.latitude = -90;
topLeftCoord.longitude = 180;

CLLocationCoordinate2D bottomRightCoord;
bottomRightCoord.latitude = 90;
bottomRightCoord.longitude = -180;

for(MKPointAnnotation* annotation in anAnnotationArray)
{
    topLeftCoord.longitude = fmin(topLeftCoord.longitude, annotation.coordinate.longitude);
    topLeftCoord.latitude = fmax(topLeftCoord.latitude, annotation.coordinate.latitude);

    bottomRightCoord.longitude = fmax(bottomRightCoord.longitude, annotation.coordinate.longitude);
    bottomRightCoord.latitude = fmin(bottomRightCoord.latitude, annotation.coordinate.latitude);
}

MKCoordinateRegion region;
region.center.latitude = topLeftCoord.latitude - (topLeftCoord.latitude - bottomRightCoord.latitude) * 0.5;
region.center.longitude = topLeftCoord.longitude + (bottomRightCoord.longitude - topLeftCoord.longitude) * 0.5;
region.span.latitudeDelta = fabs(topLeftCoord.latitude - bottomRightCoord.latitude) * 1.1; // Add a little extra …
Run Code Online (Sandbox Code Playgroud)

iphone ios6 ios6-maps

5
推荐指数
1
解决办法
2117
查看次数

在iOS 6中打开Goog​​le Maps App

我想以编程方式在iOS 6中打开Goog​​le Map App.我试图通过传递url - maps来打开地图.....但它仍然在Safari中打开

iphone ios6-maps

5
推荐指数
1
解决办法
2769
查看次数

在iOS 6.0中立即打开Apple Maps并从当前位置开始路由到Home

我想在我的应用程序中创建一个基本上标记为"带我回家"的链接.按下时,我希望它打开Apple Maps,从当前位置路由到家,然后开始转弯导航.

我找到了这个方案,但它没有做我希望的所有事情:

http://maps.apple.com/maps?saddr=%f,%f&daddr=%f,%f
Run Code Online (Sandbox Code Playgroud)

iphone ios ios6 ios6-maps

4
推荐指数
1
解决办法
4465
查看次数

如何检查用户是否在IOS6中安装了谷歌地图?

我努力寻找,但无济于事.在我的应用程序中,也运行在IOS6设备上,我有一个需要谷歌地图的MAP模块.现在在IOS6中,可能存在具有iOS6地图而非谷歌地图的设备.所以我的程序必须检查设备是否有谷歌地图,应用程序.如果没有,它会将用户链接到appStore以下载GoogleMaps应用.请指导..有人...... :(谢谢.

iphone google-maps ios6 ios6-maps

4
推荐指数
1
解决办法
2402
查看次数

在iOS 6中使用谷歌地图是绝对不可能的吗?

我想知道在iOS 6上使用谷歌地图是否完全不可能?

我准备了一个应用程序,现在当我使用iOS 6时,它会自动获取Apple地图!

由于我不想使用Apple地图,所以我想知道是否有任何方法,是否可以在iOS 6上使用Google地图!

iphone google-maps ios5 ios6 ios6-maps

3
推荐指数
1
解决办法
657
查看次数

在iOS6中为MKMapKit路由数据

我以前在iOS应用程序中做过路由,但是对于iOS6,我们现在正在显示Apple地图 - 这会导致问题,因为我们使用Google路由数据,如果我们使用Google数据,我们应该在Google地图上显示它.

我一直在搜索,但据我所知,Apple没有提供任何路由数据.到目前为止,答案最接近答案似乎是苹果公司说Apps that consume direction information do so by sending an appropriate request to the Maps app, which then handles the task of displaying that information to the user.- 对我而言,这意味着地图应用程序将被打开以显示路线,并将用户从我们的应用程序中取出.

  • 我们在哪里可以获得使用Apple地图在iOS6应用程序上使用的即时路由数据?

mapkit ios ios6 ios6-maps

3
推荐指数
2
解决办法
3124
查看次数

如何在ios 6中的地图上绘制路线?

我想在地图上显示地图和绘制路线.我的应用程序支持ios 4 plus.那么我应该如何使用地图来处理ios 6以及之前的工作.另外我想知道sholud我在我的应用程序中使用自定义mapview来显示地图和路线,或者我应该使用

[[UIApplication sharedApplication] openURL:]
Run Code Online (Sandbox Code Playgroud)

我从来没有用过MapKits.所以请提供任何教程.如果有任何可以使用的rd方库,请告诉我.

iphone maproute mapkit ios ios6-maps

3
推荐指数
1
解决办法
9251
查看次数

在ios6中映射集成

如何在iOS 6中集成地图.早期的iOS版本是否支持它?

我想在应用程序中显示一个地图,该地图必须支持iOS 5及更高版本.我怎么能这样做?在早期版本中,iOS使用谷歌地图,在最新版本中,它使用自己的地图.

有人会帮助我吗?

cocoa-touch objective-c ios ios6 ios6-maps

2
推荐指数
1
解决办法
934
查看次数

使用Apple Maps以编程方式获取路线

我对文档感到有点困惑.经过一些研究和实验,这就是我所拥有的.

if ([self canUseMKMapItem]) {
            [self iosTheMap];
        } else {
            [self googleTheMap];
        }
Run Code Online (Sandbox Code Playgroud)

使用它来检测我们是否可以使用IOS6映射功能:

- (BOOL) canUseMKMapItem {
    Class itemClass = [MKMapItem class];
    return (itemClass && [itemClass respondsToSelector:@selector(openMapsWithItems:launchOptions:)]);
}
Run Code Online (Sandbox Code Playgroud)

这适用于IOS5,使用谷歌地图.它会自动将我们带到一个屏幕,其中包含从当前地址(如果用户允许)到目的地的路线列表.

- (void)googleTheMap
{
    NSNumber *userLat = [[NSNumber alloc]initWithDouble:mapView.userLocation.coordinate.latitude];
    NSNumber *userLong = [[NSNumber alloc]initWithDouble:mapView.userLocation.coordinate.longitude];

    NSMutableString *queryString = [NSMutableString stringWithFormat:@"http://maps.google.com/?saddr=%@,%@&daddr=",userLat,userLong];
    NSString *address = [partnerObject valueForKey:ATTRIBUTE_ADDRESS];
    [queryString appendString:address];
    NSString *escaped = [queryString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:escaped]];
}
Run Code Online (Sandbox Code Playgroud)

这是棘手的部分 - 这就是我想要使用Apple Maps的方法

- (void)iosTheMap {
    NSNumber * latitude = [partnerObject valueForKey:ATTRIBUTE_LATITUDE];
    NSNumber * …
Run Code Online (Sandbox Code Playgroud)

cocoa-touch objective-c ios6 ios6-maps

2
推荐指数
1
解决办法
4317
查看次数

GoogleMap API为两点之间的方向提供了错误的坐标

我正在使用GoogleMap API在GoogleMap上显示两点之间的绘制方向.

我想在iOS 6.1上给予支持,所以我使用谷歌地图我知道iOS7恢复这个.

使用下面的代码进行解析并获取坐标的步骤以在地图上绘制折线:

NSString *str=@"http://maps.googleapis.com/maps/api/directions/json?origin=bharuch,gujarat&destination=vadodara,gujarat&sensor=false";

NSURL *url=[[NSURL alloc]initWithString:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];

NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
     NSError* error;

NSDictionary* json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];

NSArray* latestRoutes = [json objectForKey:@"routes"];

NSMutableDictionary *legs=[[[latestRoutes objectAtIndex:0] objectForKey:@"legs"] objectAtIndex:0];

NSArray *steps=[legs objectForKey:@"steps"];

NSString *startLocation,*endLocation,*totalDistance,*totalDuration;
     CLLocationCoordinate2D startLoc,endLoc;
     startLocation = [legs  objectForKey:@"start_address"];
     endLocation = [legs objectForKey:@"end_address"];
     totalDistance = [[legs objectForKey:@"distance"] objectForKey:@"text"];
     totalDuration = [[legs objectForKey:@"duration"] objectForKey:@"text"];
     startLoc=CLLocationCoordinate2DMake([[[legs objectForKey:@"start_location"] objectForKey:@"lat"] doubleValue], [[[legs objectForKey:@"start_location"] objectForKey:@"lng"] doubleValue]);
     endLoc=CLLocationCoordinate2DMake([[[legs objectForKey:@"end_location"] objectForKey:@"lat"] …
Run Code Online (Sandbox Code Playgroud)

google-maps ios ios6-maps google-maps-sdk-ios ios6.1

2
推荐指数
1
解决办法
2292
查看次数