如何在 Jetpack Compose 中将图像 url 加载到谷歌地图标记图标
我从服务器获取图像 URL,并希望在 Google 地图标记图标中加载该 URL。我该怎么做?
I get the image URL from the server and I want to load the URL in the Google Maps marker icon. How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 Glide 库
然后调用
using Glide Library
then call
我写了一篇文章在谷歌地图上显示自定义标记:
https://towardsdev.com/jetpack-compose-custom-google-map-marker-erselan-khan-e6e04178a30b
您必须从图像网址中获取可绘制对象,您可以轻松获取该对象使用线圈库进行图像加载。
https://towardsdev.com/image-url- to-bitmap-using-coil-erselan-khan-6f190ce83d7f
I have written an article to show custom marker on google map:
https://towardsdev.com/jetpack-compose-custom-google-map-marker-erselan-khan-e6e04178a30b
You have to get the drawable object from your image url, which you can easily get by using the coil library for image loading.
https://towardsdev.com/image-url-to-bitmap-using-coil-erselan-khan-6f190ce83d7f