Refactor the MapTiler configuration into a single place. (#3944)

* Refactor the MapTiler configuration into a single place.

* Merge the MapAssets catalog into the normal one.
This commit is contained in:
Doug
2025-03-26 14:39:09 +00:00
committed by GitHub
parent e0edafc48e
commit 51886b0c78
31 changed files with 190 additions and 220 deletions
@@ -97,7 +97,8 @@ final class AppSettings {
copyrightURL: URL,
acceptableUseURL: URL,
privacyURL: URL,
supportEmailAddress: String) {
supportEmailAddress: String,
mapTilerConfiguration: MapTilerConfiguration) {
self.defaultHomeserverAddress = defaultHomeserverAddress
self.oidcRedirectURL = oidcRedirectURL
self.websiteURL = websiteURL
@@ -106,6 +107,7 @@ final class AppSettings {
self.acceptableUseURL = acceptableUseURL
self.privacyURL = privacyURL
self.supportEmailAddress = supportEmailAddress
self.mapTilerConfiguration = mapTilerConfiguration
}
// MARK: - Application
@@ -290,10 +292,10 @@ final class AppSettings {
// MARK: - Maps
// maptiler base url
let mapTilerBaseURL: URL = "https://api.maptiler.com/maps"
// maptiler api key
let mapTilerApiKey = Secrets.mapLibreAPIKey
private(set) var mapTilerConfiguration = MapTilerConfiguration(baseURL: "https://api.maptiler.com/maps",
apiKey: Secrets.mapLibreAPIKey,
lightStyleID: "9bc819c8-e627-474a-a348-ec144fe3d810",
darkStyleID: "dea61faf-292b-4774-9660-58fcef89a7f3")
// MARK: - Presence