ios - iOS 谷歌地图标记,带有箭头的圆形气泡内的照片
问题描述
我需要谷歌地图中的自定义标记,我在 Android 中找到了一个链接如何制作带有圆形语音气泡内照片的谷歌地图标记?. 任何人都可以告诉我如何客观地做到这一点 - c。
解决方案
使用iconView
属性GMSMarker
将自定义视图呈现为标记。
代码:
UIImage *picture = [UIImage imageNamed:@"Your Picture"];
picture = [picture imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
UIImageView *pictureView = [[UIImageView alloc] initWithImage: picture];
pictureView.tintColor = [UIColor redColor];
CLLocationCoordinate2D position = CLLocationCoordinate2DMake(51.5, -0.127);
GMSMarker *marker = [GMSMarker markerWithPosition:position];
marker.iconView = pictureView;
marker.tracksViewChanges = YES;
marker.map = self.mapView;
更多信息,请访问https://developers.google.com/maps/documentation/ios-sdk/marker
推荐阅读
- angular - 元标记在我的角度应用程序中没有更新
- amazon-web-services - dynamodb ttl 属性和 RCU
- python - 如何从代码中的 bs4 标签元素中提取文本?使用内容功能不起作用
- python - 如何将 Plotly 图保存在 ipynb 文件中?
- julia - Julia 中对称类型的意义何在?
- python - Python 套接字服务器无法解码来自 OAUTH 的重定向
- r - 如何为R中的约束输入一系列值
- html - 为什么我的 `flex` 表格行不在 Edge 中居中?
- linux - 无法为 Beaglebone AI 配置 5GHz WiFi 频段
- python - python>=3.5 由诗歌管理的项目下如何使用python black formatter?