Relative Content

Tag Archive for swiftswiftuimapkit

Swift MapKit Depreciated MapContentBuilder

I have a basic map view with custom annotations that animate the map when clicked. Im getting the warnings below with my current approach. I’ve looked at a few other SO threads and I can’t get my code refactored and working with the functionality I have right now. I’d appreciate a quick heads up on how to use the new iOS 18 APIs.

Unexpected top margin in scroll view when a Map is present in the content

I have a problem understanding why, when I add a Map to my ScrollView, the element (in this case, Color.red) does not overlap with the navigation as shown in the picture. Does anyone know why this is happening and how to fix it? The problem occurs when the view has a navigationTitle and only happens with the Map.

Path can not showing on map

I trying to add the location of schedule as mapmarks on map of MapKit, and connect them order by time.
enter image description here
But the Path didn’t show up, and I sure that the start and end are at the right position. So I wonder is the Path not allowed to overight the MapView? If so. How do I implement this?

MapKit warnings and map Errors -Mismatching number of indices

I am trying to develop a country guessing game using MapKit and GeoJSON data. When the polygons are generated on the map, an error occurs where the map clips and does not show portions of the countries or islands when the user pinches to zoom in and out. I receive these warnings in the terminal: