因没有 Google 徽标而被拒绝 - mapkit - 但无法显示它
我的 iPhone 应用程序刚刚被拒绝,因为我的屏幕可以在地图上显示我们的位置,但苹果说它需要在地图上显示 Google 徽标 - 我为此使用了 Mapkit(以及 CoreLocation)..没什么花哨的,我什么也没做积极压制该标志。但当地图显示在应用程序中时,没有 Google 徽标。所以,我很困惑。如何显示 Google 徽标?这是我用来显示地图的基本代码:
myMapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
myMapView.mapType = MKMapTypeStandard;
myMapView.zoomEnabled;
CLLocationCoordinate2D coord = {latitude: 34.02008, longitude: -118.479707};
MKCoordinateSpan span = {latitudeDelta: 0.01, longitudeDelta: 0.01};
MKCoordinateRegion region = {coord, span};
MapController *annotation = [[MapController alloc] initWithCoordinate:coord];
annotation.currentPoint = [NSNumber numberWithInt:1];
annotation.mTitle = @"InsightLA";
annotation.mSubTitle = @"1430 Olympic Blvd, Santa Monica, CA.";
[myMapView addAnnotation:annotation];
[annotation release];
[myMapView setRegion:region];
[self.view addSubview:myMapView];
myMapView.delegate =self;
My iPhone app just got rejected because I have screen that shows our location on a map, but Apple said it needed to show the Google logo on the map - I used mapkit for this (and CoreLocation)..nothing fancy and I did nothing to actively suppress the logo. But when the map shows up in the application, there is no Google logo. So, I'm confused. How do you show the Google logo? Here is the basic code I'm using to show the map:
myMapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
myMapView.mapType = MKMapTypeStandard;
myMapView.zoomEnabled;
CLLocationCoordinate2D coord = {latitude: 34.02008, longitude: -118.479707};
MKCoordinateSpan span = {latitudeDelta: 0.01, longitudeDelta: 0.01};
MKCoordinateRegion region = {coord, span};
MapController *annotation = [[MapController alloc] initWithCoordinate:coord];
annotation.currentPoint = [NSNumber numberWithInt:1];
annotation.mTitle = @"InsightLA";
annotation.mSubTitle = @"1430 Olympic Blvd, Santa Monica, CA.";
[myMapView addAnnotation:annotation];
[annotation release];
[myMapView setRegion:region];
[self.view addSubview:myMapView];
myMapView.delegate =self;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
可能是地图框架的高度足够大,将 Google 徽标推离屏幕,或者另一个视图覆盖了它。
不断减小地图的高度,直到您在左下角看到 Google 徽标。然后从那里开始工作。
这是我在网上找到的一个部分隐藏徽标的示例。这看起来可能是由于状态栏高度而发生的。
It may be that the frame of the map is large enough in height to push the Google logo off-screen, or another view is covering it.
Keep reducing the height of the map in small chunks until you see the Google logo at the bottom left. Then work from there.
Here's one example of a partially suppressed logo I found on the net. This looks to be happening possibly because of the status bar height.
阿努拉格是对的。
您可能忘记设置自动调整大小:
Anurag is right.
You, probably, forget to setup autoresizing:
您需要更改地图视图框架的大小。我自己也遇到了同样的问题,但我将其更改为:
这应该可以解决问题:-)
You need to change the size of the frame of the mapview. I had the same problem myself, but I changed it to:
That should do the trick :-)
对mapkit不太熟悉,但您始终可以添加带有Google徽标图像的CA层,例如.aplha=5;在其中。这不是一个很好的答案,但如果你绝望的话,这是一个解决方法:)
Not as familiar with mapkit but you could always add a CA Layer with an image of the Google logo at like .aplha=5; within it. Not a great answer but a workaround if your desperate :)
我有同样的问题。我的地图是带有状态栏的全屏。我仅使用纵向模式,因此将地图高度调整为416正好可以填满我的屏幕。
I had same problem. My map is fullscreen with status bar. I use only portrait mode, so resizing map height to 416 exactly fills my screen.