From 44ba5a2574f9e94c5ace194987f4a86ae74b4877 Mon Sep 17 00:00:00 2001 From: Shuttleu Date: Thu, 7 Dec 2023 13:42:31 +0000 Subject: [PATCH] Fix map layers --- Core/Resgrid.Config/MappingConfig.cs | 2 +- Docker/resgrid.env | 4 ++++ .../Areas/User/Apps/src/app/componetns/map/map.component.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/Resgrid.Config/MappingConfig.cs b/Core/Resgrid.Config/MappingConfig.cs index 17873a02..d4cdae22 100644 --- a/Core/Resgrid.Config/MappingConfig.cs +++ b/Core/Resgrid.Config/MappingConfig.cs @@ -28,7 +28,7 @@ public static class MappingConfig public static string DispatchAppOSMKey = ""; public static string BigBoardOSMKey = ""; - public static string LeafletTileUrl = ""; + public static string LeafletTileUrl = "https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key="; public static string LeafletAttribution = "© OpenStreetMap contributors CC-BY-SA"; public static string GetWebsiteOSMUrl() diff --git a/Docker/resgrid.env b/Docker/resgrid.env index e55ca099..17a544db 100644 --- a/Docker/resgrid.env +++ b/Docker/resgrid.env @@ -73,6 +73,10 @@ RESGRID__MappingConfig__GoogleMapsJSKey= # https://developers.google.com/maps/documentation/geocoding/get-api-key RESGRID__MappingConfig__GoogleMapsApiKey= +# MapTiler API Key +# https://www.maptiler.com/ +RESGRID__MappingConfig__OSMKey= + # what 3 words api key # https://developer.what3words.com/public-api RESGRID__MappingConfig__What3WordsApiKey= diff --git a/Web/Resgrid.WebCore/Areas/User/Apps/src/app/componetns/map/map.component.ts b/Web/Resgrid.WebCore/Areas/User/Apps/src/app/componetns/map/map.component.ts index 5f669835..be96fa6b 100644 --- a/Web/Resgrid.WebCore/Areas/User/Apps/src/app/componetns/map/map.component.ts +++ b/Web/Resgrid.WebCore/Areas/User/Apps/src/app/componetns/map/map.component.ts @@ -242,7 +242,7 @@ export class MapComponent implements OnInit { if (!this.map) { var osm = L.tileLayer( - this.leafletosmurl, + this.leafletosmurl+window['rgOsmKey'], { maxZoom: 19, attribution: this.mapattribution,