Reputation:
How can I use a video game map that is in the form of a jpg? Could I use the MapKit
or maybe Google Maps API
? I have gotten some suggestions to use a UIImageView
with a scrollview, however I need this map to be searchable and have a feature similar to dropping a pin.
Upvotes: 1
Views: 171
Reputation: 5128
You can pull the map into something like TileMill using this guide to turn your image into a GeoTIFF. Since it's from a video game, it won't have real coordinates, but you can basically choose some fake coordinates for its corners and everything inside will be interpolated. You would export this map and use it with the Mapbox iOS SDK, which is an open source rewrite of MapKit but with more customizability.
Technically you could also use the map in MapKit as an MKTileOverlay
but it would have to be hosted online. With the above solution, you could export directly to an MBTiles file and use it local to the app.
Upvotes: 1