support disable map

This commit is contained in:
MaysWind
2023-06-10 17:14:58 +08:00
parent 58104a9a4d
commit e608e85d56
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -432,7 +432,9 @@ func loadDataConfiguration(config *Config, configFile *ini.File, sectionName str
}
func loadMapConfiguration(config *Config, configFile *ini.File, sectionName string) error {
if getConfigItemStringValue(configFile, sectionName, "map_provider") == OpenStreetMapProvider {
if getConfigItemStringValue(configFile, sectionName, "map_provider") == "" {
config.MapProvider = ""
} else if getConfigItemStringValue(configFile, sectionName, "map_provider") == OpenStreetMapProvider {
config.MapProvider = OpenStreetMapProvider
} else {
return errs.ErrInvalidMapProvider