make more cdn's and API urls/settings configurable

* CDNs for OCI, NSI, etc.
* OSM API (URL and oauth API settings)
* taginfo API
* nominatim API
This commit is contained in:
Martin Raifer
2022-10-14 18:24:29 +02:00
parent e8ceba1107
commit c8a3cf154b
12 changed files with 74 additions and 62 deletions
-7
View File
@@ -1,7 +0,0 @@
const presetsCdnUrl = 'https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@{presets_version}/';
const presetsCdnVersion = '3';
export {
presetsCdnUrl,
presetsCdnVersion
};
+30
View File
@@ -0,0 +1,30 @@
// cdns for external data packages
const presetsCdnUrl = 'https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@{presets_version}/';
const ociCdnUrl = 'https://cdn.jsdelivr.net/npm/osm-community-index@{version}/';
const wmfSitematrixCdnUrl = 'https://cdn.jsdelivr.net/npm/wmf-sitematrix@{version}/';
const nsiCdnUrl = 'https://cdn.jsdelivr.net/npm/name-suggestion-index@{version}/';
// api urls and settings
const osmApiConnections = [
{ // "live" db
url: 'https://www.openstreetmap.org',
client_id: '0tmNTmd0Jo1dQp4AUmMBLtGiD9YpMuXzHefitcuVStc',
client_secret: 'BTlNrNxIPitHdL4sP2clHw5KLoee9aKkA7dQbc0Bj7Q'
}, { // "dev" db
url: 'https://api06.dev.openstreetmap.org',
client_id: 'Ee1wWJ6UlpERbF6BfTNOpwn0R8k_06mvMXdDUkeHMgw',
client_secret: 'OnfWFC-JkZNHyYdr_viNn_h_RTZXRslKcUxllOXqf5g'
}
];
const taginfoApiUrl = 'https://taginfo.openstreetmap.org/api/4/';
const nominatimApiUrl = 'https://nominatim.openstreetmap.org/';
export {
presetsCdnUrl,
ociCdnUrl,
wmfSitematrixCdnUrl,
nsiCdnUrl,
osmApiConnections,
taginfoApiUrl,
nominatimApiUrl,
};