mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(vessels): a selected vessel shows its Open Vessel Photos photo and MMSI
Selecting a vessel asks Open Vessel Photos (a free, keyless API) for its
photo by MMSI, once per MMSI. The CONTACTS view shows it under the vessel's
name and MMSI with the photographer, the photo's open licence and a link to
the vessel's page; only images on Open Vessel Photos' own host are shown, and
an answer about another MMSI is no photo. The vessel source exposes the lookup
as getEnrichment({kind: 'photo'}) and fetchOpenVesselPhoto for applications
with their own vessel source.
This commit is contained in:
1 parent
c02ede3bb4
commit
347e77d1f6
31 files changed
+591
-19
No files matched your search
@@ -7,6 +7,7 @@ import { createRendering } from './rendering.js';
|
||||
import { createSelection } from './selection.js';
|
||||
import { createTracking } from './tracking.js';
|
||||
import { createCards } from './cards.js';
|
||||
import { createPhotos } from './photos.js';
|
||||
import { createTesting } from './testing.js';
|
||||
import { createEvidence } from './evidence.js';
|
||||
import { createQueries } from './queries.js';
|
||||
@@ -24,6 +25,7 @@ export function createVesselLayer({ source, services, options = {} } = {}) {
|
||||
parts.selection = createSelection(context);
|
||||
parts.tracking = createTracking(context);
|
||||
parts.cards = createCards(context);
|
||||
parts.photos = createPhotos(context);
|
||||
parts.testing = createTesting(context);
|
||||
parts.evidence = createEvidence(context);
|
||||
parts.queries = createQueries(context);
|
||||
@@ -90,6 +92,9 @@ export function createVesselLayer({ source, services, options = {} } = {}) {
|
||||
buildVesselCard: parts.cards.buildVesselCard,
|
||||
buildSelectedVesselCard: parts.cards.buildSelectedVesselCard,
|
||||
cardScreenSeparated: parts.cards.cardScreenSeparated,
|
||||
/** The vessel's Open Vessel Photos photo, once its lookup answered. */
|
||||
getVesselPhoto: (id) =>
|
||||
parts.photos.vesselPhoto(vesselState.state.records.byId.get(id)),
|
||||
});
|
||||
Object.defineProperty(layer, 'testing', { value: parts.testing });
|
||||
return layer;
|
||||
|
||||
Reference in new issue
Block a user