Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanweiler92 committed Jan 12, 2024
1 parent d355e56 commit f11a232
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
23 changes: 22 additions & 1 deletion web/js/map/granule/granule-layer-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,29 @@ export default function granuleLayerBuilder(cache, store, createLayerWMTS) {

// get granule dates waiting for CMR query and filtering (if necessary)
const availableGranules = await getQueriedGranuleDates(def, date, group);
console.log(availableGranules)

Check failure on line 240 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / macOS-latest, Node 20

Missing semicolon

Check failure on line 240 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / ubuntu-latest, Node 20

Missing semicolon

Check failure on line 240 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / windows-latest, Node 20

Missing semicolon
/*

Check failure on line 241 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / macOS-latest, Node 20

Expected indentation of 4 spaces but found 2

Check failure on line 241 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / ubuntu-latest, Node 20

Expected indentation of 4 spaces but found 2

Check failure on line 241 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / windows-latest, Node 20

Expected indentation of 4 spaces but found 2
[
{
date: '2023-12-17T22:00:00Z',
polygon: [[-148.978333, 27.035683], [-117.748947, 31.746162], [-118.743423, 52.53973], [-160.668777, 46.210739], [-148.978333, 27.035683]],
dayNight: "DAY"
},
{
date: '2023-12-17T21:54:00Z',
polygon: [[-142.217865, 6.903207], [-114.694138, 11.060287], [-117.744019, 31.871849], [-149.010025, 27.155781], [-142.217865, 6.903207]],
dayNight: "DAY"
}
]
*/

// polygon coordinates are used here to determine which items are visible
const visibleGranules = getVisibleGranules(availableGranules, count, date);
const transformedGranules = transformGranulesForProj(visibleGranules, crs);
console.log(visibleGranules)

Check failure on line 258 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / macOS-latest, Node 20

Missing semicolon

Check failure on line 258 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / ubuntu-latest, Node 20

Missing semicolon

Check failure on line 258 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / windows-latest, Node 20

Missing semicolon

// transforming each polygon coordinate to the selected projection
const transformedGranules = transformGranulesForProj(visibleGranules, crs);
console.log(transformedGranules)

Check failure on line 262 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / macOS-latest, Node 20

Missing semicolon

Check failure on line 262 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / ubuntu-latest, Node 20

Missing semicolon

Check failure on line 262 in web/js/map/granule/granule-layer-builder.js

View workflow job for this annotation

GitHub Actions / windows-latest, Node 20

Missing semicolon
return {
count,
granuleDates: transformedGranules.map((g) => g.date),
Expand All @@ -253,6 +273,7 @@ export default function granuleLayerBuilder(cache, store, createLayerWMTS) {
* @param {object} attributes
* @param {object} options
* @returns {object} - Granule layer
* This function is exported as "getGranuleLayer" and is called in layerBuilder
*/
const createGranuleLayer = async (def, attributes, options) => {
const {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = {
},
static: path.join(__dirname, 'web'),
compress: true,
port: 3000,
port: 3002,
hot: true,
historyApiFallback: true
},
Expand Down

0 comments on commit f11a232

Please sign in to comment.