地图应用的信息视图中的缩略图图像是UIImageView或MKMapView还是其他? [英] Thumbnail Image in Info View of Maps app is UIImageView or MKMapView or Something else?

查看:104
本文介绍了地图应用的信息视图中的缩略图图像是UIImageView或MKMapView还是其他?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

地图应用的信息视图中显示的缩略图是UIImageView还是MKMapView?还是别的什么?我已经发布了用红色圆圈标记缩略图的屏幕截图。

The thumbnail image shown in the info view of Maps app is UIImageView or MKMapView? Or it is something else? I have posted the screen shot marking the thumbnail with red circle.

屏幕截图(取自地图应用程序):

我想在我的应用的地图视图中选择一个图钉时显示这样的缩略图。

I want to display a thumbnail image like this when a pin is selected in a map view of my app.

我该怎么做?

我注意到有关此缩略图的以下内容:


  1. 将其视为图像:我将地图视图类型设置为 Satellite,然后使用该图钉打开信息视图。但缩略图仍然一如既往地显示在默认类型中(如在屏幕截图中)。所以我猜这个缩略图不是使用 renderInContext:方法从地图中获取的。那么它来自哪里?

  1. Considering it as an Image: I set the map view type to "Satellite" and opened the info view using the pin. But the thumbnail is still showing in the "Default" type (as in the screen shot) as always. So I guess the thumbnail is not taken from the map using renderInContext: method. So where does it come from?

将其视为地图视图:当信息视图打开时,我注意到了缩略图正在加载地图视图的加载方式。我的意思是,我可以在显示实际缩略图之前看到空网格(已加载?)。所以我想这可以是一个小的地图视图。

Considering it as a map view: While the Info view is opening I noticed that the thumbnail is loading like how a map view loads. I mean, I can see the empty grids before the actual thumbnail is displayed(loaded?). So I guess this can be a small map view.

注意:我使用MKMapView实现了这个帧大小64x64。但Google水印会显示在地图上。

实际上是什么?我想以正确的方式实现这一点。我需要你的指导。

What is it actually? I want to implement this in a right way. I need your guidance.

推荐答案

它可能是一个 MKMapView 但是被剪掉了到一个较小的超级视图。我确信Apple能够获得Google的许可,无需使用Google徽标就可以使用缩略图(可能是因为主地图视图突出显示了水印)。

It could be an MKMapView but clipped to a smaller superview. I'm sure Apple was able to get permission from Google to use that thumbnail without the Google logo (probably because the main map view shows the watermark prominently).

官方用于iPhone的Twitter应用程序(以前称为Tweetie)在查看带有位置的推文时也会显示静态地图缩略图,但没有Google徽标。点击地图会显示一个显示徽标的全屏地图。也许他们也获得了特别许可,或者也许没关系,因为全屏地图显示了徽标。但我不是律师。

The official Twitter app for iPhone (formerly Tweetie) also shows a static map thumbnail sans Google logo when viewing a tweet with a location. Tapping on the map shows you a full-screen map that does show the logo. Maybe they also got special permission, or maybe it's ok because the full-screen map shows the logo. But I am not a lawyer.

最后,作为 MKMapView 的替代方案,可以获得地图图像直接从Google使用 Google Static Maps API 。但这也需要显示Google徽标(在这种情况下,它更加突出)。

Finally, as an alternative to MKMapView, it's possible to get a map image directly from Google using the Google Static Maps API. But that also requires showing the Google logo (in this case it's even more prominent).

这篇关于地图应用的信息视图中的缩略图图像是UIImageView或MKMapView还是其他?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆