I’m trying to add an image to fill/use as a texture in a MapPolygon on my Map, however my image never shows up. Does anyone know how to use an image in a MapPolygon?
When I just use .foregroundStyle(.green) the green color shows up, but the image just won’t show.
Here’s my code:
Map(position: $camera, bounds: viewModel.camera) {
MapPolygon(coordinates: coords).foregroundStyle(.image(Image(.img)).opacity(0.9))
}
New contributor
Steffi Bing Lin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.