ios - 自定义标记图标 Google Maps iOS 与图像中的图像?

标签 ios google-maps-markers google-maps-sdk-ios

关闭。这个问题是off-topic .它目前不接受答案。












想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。

8年前关闭。




Improve this question




我尝试在 map 中创建许多标记,图标是一个类似于占位符的 png 图像。
之后,我想在每个占位符内设置另一个图像。

looks like this .
我的问题是如何在标记的图像内设置图像。
怎么做?

最佳答案

您需要编写获取背景图像(例如框架)并添加子图像(例如食物图片)的代码,以创建组合 UIImage .然后你可以使用组合的 UIImage作为标记的图标。

查看这些问题,了解如何绘制 2 UIImage 的一些示例对象合并为一个 UIImage :

Draw another image on a UIImage

Attempting to draw image on top of another image using a touch event

关于ios - 自定义标记图标 Google Maps iOS 与图像中的图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16931180/

相关文章:

android - 从 Google Map 的 setOnInfoWindowClickListener 接口(interface)方法替换 fragment 时 UI 挂起

javascript - 如何在谷歌地图API中设置起点和终点标记

android - 当我尝试在 marshmellow 版本上打开 MAP 时可能出现未处理的 promise 拒绝

ios - 谷歌地图 iOS SDK : Distance between east and west points on the map

swift - 将 Google map 添加到 Swift 中的 View

ios - 在提交测试之前在 Apple Watch 中安装应用程序

ios - 处理核心数据保存错误的正确方法

ios - 从概念上讲,子类化 UIView 是否正确?

ios - 在 XCode 中 react native 调试 iOS 组件

ios - 我需要一个 API 来绘制航点并给我一条通过它们的路线,并给我城市人口。我应该使用哪个 API?