Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mapkit - Get altitude

Is there a way to get altitude, with mapkit, from given points from the map? (Without being in spot).

For example touching the map, and getting altitude for touched map coordinates.

like image 205
J.D. Avatar asked Dec 21 '16 18:12

J.D.


People also ask

What is MapKit span?

You use the delta values in a coordinate span to indicate the desired zoom level of the map. Smaller delta values correspond to a higher zoom level. The "span" in this class refers to the width and height of a region, with distances expressed in degrees of latitude and longitude.

How do I use MapKit in swift 5?

Storyboard SetupGo to the storyboard. Drag a MapKit View to the main View. Give the MapKit View the same size as the main View. Select the MapKit View and go to the Pin button from the Auto Layout button on the bottom-right of the Storyboard and fill in the following values.


1 Answers

MapKit doesn't provide the altitude at a given point. You can only know the current altitude of the camera of a MKMapView, or the altitude of the user position. For your purpose, you can afford on external web services like:

  • Google Maps Elevation API
  • MapQuest API
like image 154
Nicola Giancecchi Avatar answered Nov 26 '22 00:11

Nicola Giancecchi