mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Main gained three imagery providers (Google Street View, KartaView,
Panoramax), shared line-coverage, cone and photo-viewer modules, one source
lit at a time and the translated interface. Their shared modules still
carried what this branch removes, so the merge ports them onto it:
- lineCoverage.js is this branch's coverage.js made provider-neutral
(draped lines near the ground only, the selection drawn over them, key
and rate-limit blocking); sequenceCones.js is sequences.js the same way.
Mapillary, KartaView and Panoramax all build on them; Mapillary moves
back to providers/mapillary/ beside the others.
- No ground casting, mesh sampling, surface modes, FOLLOW, legend, prewarm,
orbit overview points (Panoramax's density dots included), stale-tile
swaps or water-filled point budget come back.
- Kept from main because the new providers need them: requiresMapStack and
attachMapStackController (Street View on Google 3D only), ground clicks,
openNearest with an optional provider nearestImage, openImage {frame},
reportError, the view-cone marker (now an SVG glyph), filters /
coverageLabel / sinceBasis, OPEN STREET VIEW, keyAlternatives and i18n.
- photoViewer.js treats the viewer as expanded when its wrap is full screen
or the iPhone popover, as EXPAND now is.
- The fixture browser gate keeps its 8 steps and adds one each for
KartaView and Panoramax; catalogs, docs, boundaries and format scope
follow.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
43 lines
1.7 KiB
JavaScript
43 lines
1.7 KiB
JavaScript
import { createStreetLevelLayer } from '../../layers/streetLevel/index.js';
|
|
import { createMapillaryProvider } from '../../layers/streetLevel/providers/mapillary/index.js';
|
|
import { createGoogleProvider } from '../../layers/streetLevel/providers/google/index.js';
|
|
import { createKartaViewProvider } from '../../layers/streetLevel/providers/kartaview/index.js';
|
|
import { createPanoramaxProvider } from '../../layers/streetLevel/providers/panoramax/index.js';
|
|
import * as sprites from '../../data/spriteOrder.js';
|
|
import * as picking from '../../data/pickRegistry.js';
|
|
import * as input from '../../data/inputOwnership.js';
|
|
import * as scenePick from '../../data/scenePick.js';
|
|
import * as render from '../../renderGovernor.js';
|
|
|
|
/** The browser Maps key the scene was started with (src/app/scene.js). */
|
|
const googleApiKey = () => globalThis.window?.__GOOGLE_MAPS_API_KEY__ || null;
|
|
|
|
/**
|
|
* Mapillary, Google Street View, KartaView and Panoramax, once the Mapillary
|
|
* source is supplied; else none.
|
|
*/
|
|
function defaultProviders(sources) {
|
|
if (sources.mapillary == null) return [];
|
|
return [
|
|
createMapillaryProvider({ source: sources.mapillary }),
|
|
createGoogleProvider({ getApiKey: googleApiKey }),
|
|
createKartaViewProvider(),
|
|
createPanoramaxProvider(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Inject providers, or use the defaults. An explicit provider list replaces
|
|
* them; an unused sources.mapillary is neither constructed nor validated,
|
|
* including when the list is empty.
|
|
*/
|
|
export function createApplicationStreetLevel({
|
|
sources = {},
|
|
providers = defaultProviders(sources),
|
|
}) {
|
|
return createStreetLevelLayer({
|
|
providers,
|
|
services: { sprites, picking, input, scenePick, render },
|
|
});
|
|
}
|