@panoramax/web-viewer
Version:
Panoramax web viewer for geolocated pictures
120 lines (100 loc) • 2.72 kB
JavaScript
/*
* Settings that may be useful to change for special cases (e.g. offline implementation).
* Most users will be fine with the defaults.
*/
/**
* Default map background tiles
* @returns {string} The website URL
*/
export function MapTiles() {
return "https://panoramax.openstreetmap.fr/pmtiles/basic.json";
}
/**
* Panoramax website URL
* @returns {string} The website URL
*/
export function PanoramaxWebsiteURL() {
return "https://panoramax.fr";
}
/**
* Panoramax Presets URL
* @returns {string} The presets URL
*/
export function PanoramaxPresetsURL() {
return "https://presets.panoramax.fr";
}
/**
* Panoramax meta-catalog URL
* @returns {string} The metacatalog URL
*/
export function PanoramaxMetaCatalogURL() {
return "https://explore.panoramax.fr";
}
/**
* Temaki icons URL
* @param {string} [iconName] The icon name to insert in URL
* @returns {string} The SVG icon URL
*/
export function TemakiIconURL(iconName) {
return `https://raw.githubusercontent.com/rapideditor/temaki/refs/heads/main/icons/${iconName}.svg`;
}
/**
* Wikidata URL
* @returns {string} The Wikidata URL
*/
export function WikidataURL() {
return "https://www.wikidata.org/wiki";
}
/* -----------------------------------------------------
* OpenStreetMap docs & tools
*/
/**
* OpenStreetMap iD editor URL
* @returns {string} The editor URL
*/
export function IdEditorURL() {
return "https://www.openstreetmap.org/edit?editor=id";
}
/**
* OpenStreetMap wiki URL
* @returns {string} The wiki URL
*/
export function OSMWikiURL() {
return "https://wiki.openstreetmap.org/wiki";
}
/* -----------------------------------------------------
* Internet speed tests
*/
/**
* Get the threshold fast internet speed value.
*
* @returns {number} the minimum speed in MBps for internet to be considered "fast"
*/
export function InternetFastThreshold() {
return 10;
}
/**
* Get the fast internet speed test file.
*
* @returns {string} URL for the file to use for internet speed testing.
*/
export function InternetFastTestFile() {
return "https://panoramax.openstreetmap.fr/images/05/ca/2c/98/0111-4baf-b6f3-587bb8847d2e.jpg";
}
/* -----------------------------------------------------
* Geocoding-related settings
*/
/**
* Get the Base Adresse Nationale URL for geocoding API.
* @returns {string} The Base Adresse Nationale URL (must support /search calls).
*/
export function AdresseDataGouvBaseURL() {
return "https://data.geopf.fr/geocodage/search";
}
/**
* Get the Nominatim base URL for geocoding API.
* @returns {string} The Nominatim URL (must support /search & /reverse calls).
*/
export function NominatimBaseUrl() {
return "https://nominatim.openstreetmap.org";
}