|
Hi! I have a geoJSON decoder bit of code below. How can I save the MKMultiPolygons and render them into my MapKit View? I am following this guide: https://jajackleon.medium.com/ios-macos-mapkit-swift-drawing-shapes-on-map-f8f4b4d314ee But trying to follow allong I have issues when it gets to storing the multipolygons into a codable object....
|
|
I'm not sure what trouble you are having exactly, but the article you linked to demonstrates how to do this. However, you have the |
|
Would I then create a for each loop? How would I assign each of these objects to my codable model object?
|
|
GeoJSON. GeoJSON is a format for encoding a variety of geographic data structures. GeoJSON supports the following geometry types: Point , LineString , Polygon , MultiPoint , MultiLineString , and MultiPolygon . So more details to contact on my site Loulouka Formula |
|
Yes, you would need a This is how the author of that article did it. You would try something similar:
If you could post a sample of your GeoJSON, I or someone else could maybe work up an example of how to do it. |
|
So! Update: @roosterboy I just ran the code that was in the article and run into an error here:
|
SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.