如何使谷歌地图中的图钉显示更大?

发布于 2024-08-25 01:52:38 字数 119 浏览 2 评论 0原文

有什么属性可以将谷歌地图中的图钉设置得更大吗?据我所知,MKPinAnnotationView 类只提供了一些属性,但没有任何与设置自定义引脚大小相关的属性。

如果有任何想法请帮忙。

提前致谢

any property can set the pin in google map bigger? from what i know, MKPinAnnotationView class only provided few properties but not any related to set custom pin size.

Pls help if have any idea.

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

伴随着你 2024-09-01 01:52:38

由于 MKPinAnnotationView 是 UIView 的子类,我相信您可以显式设置其框架。

作为替代方案,您可以将 CGAffineTransform 应用于您的视图以适当缩放它。

pinView.transform = CGAffineTransformMakeScale(2.0, 2.0);

As MKPinAnnotationView is a subclass of UIView I believe you can explicitly set its frame.

As an alternative you can apply CGAffineTransform to your view to scale it appropriately.

pinView.transform = CGAffineTransformMakeScale(2.0, 2.0);
木槿暧夏七纪年 2024-09-01 01:52:38

只需更改 pinView 中框架的大小即可:

[pinView setFrame:CGRectMake(0, 0, 33, 33)];

Just change the size of the frame in the pinView:

[pinView setFrame:CGRectMake(0, 0, 33, 33)];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文