mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 09:42:21 +00:00
The suggester asks Photon, the place search's keyless geocoder, for candidates as a place is typed: at most one request every 500 ms, a six second limit, and none for a minute after a refusal. Text that may be private (an email address, seven or more digits however separated, an IBAN shape, a password, PIN, token or key) is never sent. It also lists a region's bundled cities and tells whether a place lies in an extent, for the search box's place strip. The browser's Photon setting is read in one place. Co-authored-by: Sameh Khamis <[email protected]>
24 lines
890 B
JavaScript
24 lines
890 B
JavaScript
import { createStandaloneApplication } from './standalone/application.js';
|
|
import { describeError } from './standalone/errors.js';
|
|
import { t } from './i18n/index.js';
|
|
import { PHOTON_SETTING as photonSetting } from './search/photonSetting.js';
|
|
|
|
const application = createStandaloneApplication({
|
|
googleApiKey: import.meta.env.GOOGLE_MAPS_API_KEY,
|
|
cesiumToken: import.meta.env.CESIUM_ION_TOKEN,
|
|
geospatial:
|
|
photonSetting === undefined ? {} : { endpoints: { photon: photonSetting } },
|
|
allowQaRegistration: import.meta.env.DEV,
|
|
});
|
|
|
|
application.start().catch((error) => {
|
|
console.error("God's Eye View initialization failed:", error);
|
|
const loaderStatus = document.querySelector('#loading-screen .loader-status');
|
|
loaderStatus.textContent = t('Error: {message}', {
|
|
message: describeError(error),
|
|
});
|
|
loaderStatus.style.color = '#ff4444';
|
|
});
|
|
|
|
export { application };
|