custom map tile server supports annotation layer

This commit is contained in:
MaysWind
2024-07-21 20:39:10 +08:00
parent aae23c285e
commit 0f8de8d699
7 changed files with 52 additions and 24 deletions
+9 -1
View File
@@ -40,7 +40,15 @@ func ServerSettingsCookie(config *settings.Config) core.MiddlewareHandlerFunc {
settingsArr = append(settingsArr, buildStringSetting("cmzl", fmt.Sprintf("%d-%d-%d", config.CustomMapTileServerMinZoomLevel, config.CustomMapTileServerMaxZoomLevel, config.CustomMapTileServerDefaultZoomLevel)))
if !config.EnableMapDataFetchProxy {
settingsArr = append(settingsArr, buildEncodedStringSetting("cmsu", config.CustomMapTileServerUrl))
settingsArr = append(settingsArr, buildEncodedStringSetting("cmsu", config.CustomMapTileServerTileLayerUrl))
if config.CustomMapTileServerAnnotationLayerUrl != "" {
settingsArr = append(settingsArr, buildEncodedStringSetting("cmau", config.CustomMapTileServerAnnotationLayerUrl))
}
} else {
if config.CustomMapTileServerAnnotationLayerUrl != "" {
settingsArr = append(settingsArr, buildBooleanSetting("cmap", config.EnableMapDataFetchProxy))
}
}
}