Skip to content

Commit

Permalink
feat: add COG_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujit committed Nov 15, 2024
1 parent 4002d79 commit c5e9ae4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ SITE_NAME=${SITE_NAME:-"DTM-Drone Tasking Manager"}
BASE_URL=${BASE_URL:-http://localhost:8000/api}
API_URL_V1=${API_URL_V1:-http://localhost:8000/api}
NODE_ODM_URL=${NODE_ODM_URL:-http://odm-api:3000}
COG_URL=${COG_URL}


### ODM ###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { LngLatBoundsLike, RasterSourceSpecification } from 'maplibre-gl';
import { useEffect, useMemo } from 'react';
import { useDispatch } from 'react-redux';

const { S3_ENDPOINT } = process.env;
const { COG_URL } = process.env;

const TaskOrthophotoPreview = () => {
const dispatch = useDispatch();
Expand All @@ -35,7 +35,7 @@ const TaskOrthophotoPreview = () => {
const orthophotoSource: RasterSourceSpecification = useMemo(
() => ({
type: 'raster',
url: `cog://${S3_ENDPOINT}/dtm-data/projects/${projectId}/${taskId}/orthophoto/odm_orthophoto.tif`,
url: `cog://${COG_URL}/dtm-data/projects/${projectId}/${taskId}/orthophoto/odm_orthophoto.tif`,
tileSize: 256,
}),

Expand Down
2 changes: 1 addition & 1 deletion src/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default defineConfig({
API_URL_V1: process.env.API_URL_V1,
SITE_NAME: process.env.SITE_NAME,
STATIC_BASE_URL: process.env.STATIC_BASE_URL,
S3_ENDPOINT: process.env.S3_ENDPOINT,
COG_URL: process.env.COG_URL,
},
},
server: {
Expand Down

0 comments on commit c5e9ae4

Please sign in to comment.