Skip to content

Commit a651a88

Browse files
committed
Remove COG source type
This is now handled via Deck.gl layers instead of MapLibre.
1 parent eea79de commit a651a88

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

src/lib/sources.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ const getRecordSource = (record: OgmRecord): AddSourceObject | undefined => {
9191
// Methods that create new sources are added here in order of preference
9292
// The first one that returns a valid source will be used
9393
recordGeoJSONSource(record),
94-
recordCOGSource(record),
9594
recordWMSSource(record),
9695
recordTMSSource(record),
9796
recordXYZSource(record),
@@ -151,26 +150,6 @@ const recordGeoJSONSource = (record: OgmRecord): AddSourceObject | undefined =>
151150
};
152151
};
153152

154-
// Given a record, create a MapLibre COG source, if possible
155-
const recordCOGSource = (record: OgmRecord): AddSourceObject | undefined => {
156-
// If no COG reference, nothing to do
157-
const cogUrl = record.references.cogUrl;
158-
if (!cogUrl) return;
159-
160-
// Add the cog:// protocol that will tell MapLibre to use the plugin
161-
const url = `cog://${cogUrl}`;
162-
163-
return {
164-
id: record.id,
165-
source: {
166-
type: 'raster',
167-
url,
168-
tileSize: 256,
169-
attribution: record.attribution,
170-
},
171-
};
172-
};
173-
174153
// Given a record, create a MapLibre WMS source, if possible
175154
const recordWMSSource = (record: OgmRecord): AddSourceObject | undefined => {
176155
// If no WMS reference or no WXS layer identifier, nothing we can do

0 commit comments

Comments
 (0)