I am working on an iOS application. Where I show the Elevation and Topography map of a certain area. I have managed to download the .hgt file within app from here.
So far I am able to extract the Elevation from the hgt file. Now I have to also show the Terrain Map for that area. I have been searching about it and I think I can't create terrain map directly with hgt file within iOS application. I have to use GRASS GIS, SRTM2OSM or TileMill to create terrain map and then use it in application.
Can please anyone direct me what I can do here and how to proceed.
I have asked to not to use any kind of map for this. So basically I have to create the map by using core drawing, and I have no idea about it.
Something Like this without the text:
With iOS you have access to Maps through MapKit framework to display map or satellite imagery directly from your app's interface, you can use also Google Maps through Google Maps SDK for iOS but both (iOS Maps and Google Maps) don't have a terrain level.
So to avoid to re-create something that already exist you can take a look to the OpenStreetMaps frameworks, here you can find many available frameworks, one of them is called MapBox and you can download the latest sources and example here
As you can read from wiki pages we have also the terrain level:
I think it's a really useful library, updated and working with swift 4 , here you can find an easy tutorial to start:
import Mapbox class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let mapView = MGLMapView(frame: view.bounds) mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight] mapView.setCenter(CLLocationCoordinate2D(latitude: 40.74699, longitude: -73.98742), zoomLevel: 9, animated: false) view.addSubview(mapView) // to show the terrain level mapView.styleURL = MGLStyle.outdoorsStyleURL() } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With