谷歌地图静态地图 - 适合地图宽度为100%



Google Maps Static API (https://developers.google.com/maps/documentation/maps-static/intro( 将地图的高度和宽度硬编码为 URL 参数(以像素为单位(。有没有办法让地图渲染父容器的 100% 宽度和 100% 高度?

在 SwiftUI 中使用 GeometryReader 获取父容器的宽度并将其传递给 google 静态地图网址。

最新更新