mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
Merge upstream main into feat/tools-area-breakdowns
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
acd75efc7c
170 files changed
+17252
-1155
No files matched your search
+11
-3
@@ -15,9 +15,9 @@ export const PANEL_WORKER_PRELUDE_PATH = 'cesium/worker-prelude.js';
|
||||
/**
|
||||
* Sites the app's browser code loads from directly: map imagery, 3D tiles,
|
||||
* terrain, fonts, and Street Level's Mapillary Graph API and image CDN (its
|
||||
* coverage tiles come through the app's server), Google Street View and
|
||||
* KartaView. Everything from the app's
|
||||
* own server comes through the MCP server.
|
||||
* coverage tiles come through the app's server), Google Street View,
|
||||
* KartaView and Panoramax. Everything from the app's own server comes
|
||||
* through the MCP server.
|
||||
*/
|
||||
const PROVIDER_ORIGINS = Object.freeze([
|
||||
'https://tile.googleapis.com',
|
||||
@@ -49,6 +49,14 @@ const PROVIDER_ORIGINS = Object.freeze([
|
||||
'https://api.kartaview.org',
|
||||
'https://cdn.kartaview.org',
|
||||
'https://*.openstreetcam.org',
|
||||
// Panoramax's meta-catalogue, and the federated instances holding most of
|
||||
// its pictures (a picture on another instance shows only in the app).
|
||||
'https://api.panoramax.xyz',
|
||||
'https://panoramax.openstreetmap.fr',
|
||||
'https://panoramax.ign.fr',
|
||||
// IGN's pictures redirect to its OVH object storage.
|
||||
'https://panoramax-storage-public-fast.s3.gra.perf.cloud.ovh.net',
|
||||
'https://panoramax.mapcomplete.org',
|
||||
]);
|
||||
|
||||
export const MCP_APP_MIME_TYPE = 'text/html;profile=mcp-app';
|
||||
|
||||
@@ -457,6 +457,51 @@ test('bike share names the systems it did not search', async () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('bike share over Oslo searches only the nearby Norwegian systems', async () => {
|
||||
const requested = [];
|
||||
const result = await composeCatalog({
|
||||
tools: coreTools,
|
||||
services: {
|
||||
bikeshare: {
|
||||
systems: GBFS_CITY_REGISTRY,
|
||||
getStations: async (url) => {
|
||||
requested.push(url);
|
||||
return { data: { stations: [] } };
|
||||
},
|
||||
},
|
||||
},
|
||||
}).call('get_bike_share', {
|
||||
area: { lat: 59.9139, lon: 10.7522, radius_km: 5 },
|
||||
});
|
||||
assert.deepEqual(result.data.systems.sort(), [
|
||||
'Lillestrøm, Norway',
|
||||
'Oslo, Norway',
|
||||
]);
|
||||
assert.deepEqual(result.data.systems_not_searched, []);
|
||||
assert.ok(
|
||||
requested.every(
|
||||
(url) =>
|
||||
url.startsWith('https://gbfs.urbansharing.com/oslobysykkel.no/') ||
|
||||
url.startsWith('https://api.cyclocity.fr/contracts/lillestrom/'),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test('bike share over Stavanger searches Kolumbus Bysykkel', async () => {
|
||||
const result = await composeCatalog({
|
||||
tools: coreTools,
|
||||
services: {
|
||||
bikeshare: {
|
||||
systems: GBFS_CITY_REGISTRY,
|
||||
getStations: async () => ({ data: { stations: [] } }),
|
||||
},
|
||||
},
|
||||
}).call('get_bike_share', {
|
||||
area: { lat: 58.97, lon: 5.7331, radius_km: 5 },
|
||||
});
|
||||
assert.deepEqual(result.data.systems, ['Stavanger, Norway']);
|
||||
});
|
||||
|
||||
test('traffic counts only roads inside a radius area and reports missing tiles', async () => {
|
||||
const flow = (segments, partial = false) => ({
|
||||
getStatus: async () => ({ hasKey: true }),
|
||||
|
||||
Reference in new issue
Block a user