Skip to content

Commit

Permalink
feat(versioning): load remote data from versioned urls
Browse files Browse the repository at this point in the history
  • Loading branch information
pwambach committed Mar 9, 2020
1 parent c9fdf3f commit bb5b56b
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/scripts/config/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,17 @@ const globeState: GlobeState = {
}
};

// @ts-ignore - injected via webpack's define plugin
const version = INFO_VERSION;

export default {
api: {
layers:
'https://storage.googleapis.com/esa-cfs-storage/layers/layers-{lang}.json',
layer:
'https://storage.googleapis.com/esa-cfs-storage/layers/{id}/metadata.json',
layerTiles:
'https://storage.googleapis.com/esa-cfs-tiles/test/{id}/{timeIndex}/{z}/{y}/{x}.png',
layerSingleImage:
'https://storage.googleapis.com/esa-cfs-tiles/test/{id}/{timeIndex}.jpg',
stories:
'https://storage.googleapis.com/esa-cfs-storage/stories/stories-{lang}.json',
story:
'https://storage.googleapis.com/esa-cfs-storage/stories/{id}/{id}-{lang}.json'
layers: `https://storage.googleapis.com/esa-cfs-storage/${version}/layers/layers-{lang}.json`,
layer: `https://storage.googleapis.com/esa-cfs-storage/${version}/layers/{id}/metadata.json`,
layerTiles: `https://storage.googleapis.com/esa-cfs-tiles/${version}/{id}/{timeIndex}/{z}/{y}/{x}.png`,
layerSingleImage: `https://storage.googleapis.com/esa-cfs-tiles/${version}/{id}/{timeIndex}.jpg`,
stories: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/stories-{lang}.json`,
story: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/{id}/{id}-{lang}.json`
},
globe: globeState
};

0 comments on commit bb5b56b

Please sign in to comment.