forked from NYANDEV/forgejo
[FEAT] Use OpenStreetMap in USER_LOCATION_MAP_URL by default
Follow-up tod58c542579
for Forgejo. By default, Gitea does not select any map service that can be used to introduce a 'Show this place on a map' button in the location field of a user profile. Before I tried upstreaming this change to Gitea, this was the case in Forgejo. This patch essentially recovers this functionality, which is nice for public-facing instances and communities. Links to original PRs: - https://codeberg.org/forgejo/forgejo/pulls/1076 - https://github.com/go-gitea/gitea/pull/26214 (cherry picked from commit bb187d5f617f8efceb41810d6ff9adcaa60450bb) (cherry picked from commit ce02ef9078a8731921caa4f7b0c1b0ac3b59a784) (cherry picked from commit 6b75c40e2575e23810880ee8e368dc1781e2b4e4) (cherry picked from commit 6bc8e9f5737f5721ddcd1ef5926a778a7f66a4a3) (cherry picked from commit 063f8afdf7c2cca014c60dcc3d78d270fd236f8f) (cherry picked from commit c5cc736b72e1ba980519e9258686f41e4eb78b42) (cherry picked from commit 7b1bb4bedc6196fb6e8516d9a34092b16d7fab05) (cherry picked from commit 2a022dceb4b391e2fc25b077193ae22a71380eee) (cherry picked from commit a946c142d2448cb92daaea11851cf7f00921f062) (cherry picked from commit 8a4ea0c7ab8960f41a67442fa2f485fe0a901a96) (cherry picked from commit 37bfb05b34e61194afe407acac5778258315b756) (cherry picked from commit 12fbbb1754a1a836f6923431e47a5de95aec6b2e) (cherry picked from commit abe9de2cd91d7c5f176ceddff20ce194439703c4) (cherry picked from commit 84db57871785d84c2a32edc22f769821b3bec961) (cherry picked from commit1beab7af46
) (cherry picked from commit8779d505f2
) (cherry picked from commit 21a788f2eb549a494d52ab23a47533d9a7534ee6) (cherry picked from commit a7cc6d168772e13bcf0808da14ff1ddf9baa64b2) (cherry picked from commit 25f840379f19e0b90e69078e6c09a3c36fdf13ac) (cherry picked from commit 0db65f11224f030877e5279b85af4b9e3e975ca7) (cherry picked from commit 0e08cbc854cc1561101f1efe68de1d0860f7c905) (cherry picked from commit 57de51db8d965a6c5a90477f58d2600fa3e7feda) (cherry picked from commit 5ab3dcabb1461f4453f58718c6802baeffff06c9)
This commit is contained in:
parent
f2cdb2fa66
commit
7b5ad0c13b
2 changed files with 3 additions and 3 deletions
|
@ -845,12 +845,12 @@ LEVEL = Info
|
|||
;;
|
||||
;; Default map service. No external API support has been included. A service has to allow
|
||||
;; searching using URL parameters, the location will be appended to the URL as escaped query parameter.
|
||||
;; Disabled by default, some example values are:
|
||||
;; Some example values are:
|
||||
;; - OpenStreetMap: https://www.openstreetmap.org/search?query=
|
||||
;; - Google Maps: https://www.google.com/maps/place/
|
||||
;; - MapQuest: https://www.mapquest.com/search/
|
||||
;; - Bing Maps: https://www.bing.com/maps?where1=
|
||||
; USER_LOCATION_MAP_URL =
|
||||
; USER_LOCATION_MAP_URL = https://www.openstreetmap.org/search?query=
|
||||
;;
|
||||
;; Enable heatmap on users profiles.
|
||||
;ENABLE_USER_HEATMAP = true
|
||||
|
|
|
@ -188,7 +188,7 @@ func loadServiceFrom(rootCfg ConfigProvider) {
|
|||
Service.AllowCrossRepositoryDependencies = sec.Key("ALLOW_CROSS_REPOSITORY_DEPENDENCIES").MustBool(true)
|
||||
Service.DefaultAllowOnlyContributorsToTrackTime = sec.Key("DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME").MustBool(true)
|
||||
Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply." + Domain)
|
||||
Service.UserLocationMapURL = sec.Key("USER_LOCATION_MAP_URL").String()
|
||||
Service.UserLocationMapURL = sec.Key("USER_LOCATION_MAP_URL").MustString("https://www.openstreetmap.org/search?query=")
|
||||
Service.EnableUserHeatmap = sec.Key("ENABLE_USER_HEATMAP").MustBool(true)
|
||||
Service.AutoWatchNewRepos = sec.Key("AUTO_WATCH_NEW_REPOS").MustBool(true)
|
||||
Service.AutoWatchOnChanges = sec.Key("AUTO_WATCH_ON_CHANGES").MustBool(false)
|
||||
|
|
Loading…
Reference in a new issue