Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.33 KB

README.md

File metadata and controls

29 lines (19 loc) · 1.33 KB

meteoblue Maps API – iOS MapLibre example

A minimal iOS app (SwiftUI) that shows a meteoblue temperature forecast map using MapLibre Native iOS.

Temperature forecast map in the MapLibre example app

All relevant code is in MapView.swift:

  1. Background map: the meteoblue map style https://maps-api.meteoblue.com/mapstyle/weathermap
  2. Time API: https://maps-api.meteoblue.com/v1/time/hourly/{domain} returns the current time step
  3. Tile API: raster tiles from https://maps-api.meteoblue.com/v1/map/raster/{domain}/{time}/{layer}/{z}/{x}/{y} are added as a MapLibre raster layer below the labels of the background map

Run

Open MapsAPIMapLibre.xcodeproj in Xcode and run the MapsAPIMapLibre scheme. MapLibre is added via Swift Package Manager and is fetched automatically. To run on a device, select your development team under Signing & Capabilities.

API key

The app uses a rate-limited demo API key, which will be replaced from time to time. Get your own API key here and set apiKey in MapView.swift.

Documentation