diff --git a/adjacent-servers/stac/.env.example b/adjacent-servers/stac/.env.example index c3240f35..6240c832 100644 --- a/adjacent-servers/stac/.env.example +++ b/adjacent-servers/stac/.env.example @@ -1,6 +1,7 @@ POSTGRES_USER= POSTGRES_PASS= -POSTGRES_DBNAME= +# hardcoded to mmgis-stac +POSTGRES_DBNAME=mmgis-stac POSTGRES_HOST=localhost POSTGRES_HOST_READER=localhost POSTGRES_HOST_WRITER=localhost diff --git a/adjacent-servers/tipg/.env.example b/adjacent-servers/tipg/.env.example index 0ee541df..551b3d5c 100644 --- a/adjacent-servers/tipg/.env.example +++ b/adjacent-servers/tipg/.env.example @@ -26,6 +26,7 @@ TITILER_PGSTAC_API_DEBUG=TRUE POSTGRES_USER= POSTGRES_PASS= -POSTGRES_DBNAME= +# hardcoded to mmgis-stac +POSTGRES_DBNAME=mmgis-stac POSTGRES_HOST=localhost POSTGRES_PORT=5432 \ No newline at end of file diff --git a/adjacent-servers/titiler-pgstac/.env.example b/adjacent-servers/titiler-pgstac/.env.example index 3686d94b..18887757 100644 --- a/adjacent-servers/titiler-pgstac/.env.example +++ b/adjacent-servers/titiler-pgstac/.env.example @@ -37,6 +37,7 @@ TITILER_PGSTAC_SEARCH_SKIPCOVERED=FALSE POSTGRES_USER= POSTGRES_PASS= -POSTGRES_DBNAME= +# hardcoded to mmgis-stac +POSTGRES_DBNAME=mmgis-stac POSTGRES_HOST=localhost POSTGRES_PORT=5432 diff --git a/configure/src/pages/APIs/APIs.js b/configure/src/pages/APIs/APIs.js index 82381d3b..592fff01 100644 --- a/configure/src/pages/APIs/APIs.js +++ b/configure/src/pages/APIs/APIs.js @@ -46,7 +46,7 @@ const apiCards = { subtitle: "FastAPI implementation of the STAC API spec.", description: "", link: `${window.location.pathname - .replace(`${window.mmgisglobal.ROOT_PATH || ""}/configure-beta`, "") + .replace(`/configure-beta`, "") .replace(/^\//g, "")}/stac/api.html`, active: window.mmgisglobal.WITH_STAC === "true", }, @@ -56,7 +56,7 @@ const apiCards = { "A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL.", description: "", link: `${window.location.pathname - .replace(`${window.mmgisglobal.ROOT_PATH || ""}/configure-beta`, "") + .replace(`/configure-beta`, "") .replace(/^\//g, "")}/titiler/api.html`, active: window.mmgisglobal.WITH_TITILER === "true", }, @@ -66,7 +66,7 @@ const apiCards = { "TiTiler-PgSTAC is a TiTiler extension that connects to a PgSTAC database to create dynamic mosaics based on search queries.", description: "", link: `${window.location.pathname - .replace(`${window.mmgisglobal.ROOT_PATH || ""}/configure-beta`, "") + .replace(`/configure-beta`, "") .replace(/^\//g, "")}/titilerpgstac/api.html`, active: window.mmgisglobal.WITH_TITILER_PGSTAC === "true", }, @@ -76,7 +76,7 @@ const apiCards = { "Simple and Fast Geospatial OGC Features and Tiles API for PostGIS.", description: "", link: `${window.location.pathname - .replace(`${window.mmgisglobal.ROOT_PATH || ""}/configure-beta`, "") + .replace(`/configure-beta`, "") .replace(/^\//g, "")}/tipg/api.html`, active: window.mmgisglobal.WITH_TIPG === "true", }, diff --git a/configure/src/pages/STAC/STAC.js b/configure/src/pages/STAC/STAC.js index 712fbe39..8ad66200 100644 --- a/configure/src/pages/STAC/STAC.js +++ b/configure/src/pages/STAC/STAC.js @@ -441,7 +441,14 @@ export default function STAC() { aria-label="info" onClick={() => { window - .open(`/stac/collections/${row.id}`, "_blank") + .open( + `${window.location.pathname + .replace(`/configure-beta`, "") + .replace(/^\//g, "")}/stac/collections/${ + row.id + }`, + "_blank" + ) .focus(); }} > @@ -457,7 +464,11 @@ export default function STAC() { onClick={() => { window .open( - `/stac/collections/${row.id}/items`, + `${window.location.pathname + .replace(`/configure-beta`, "") + .replace(/^\//g, "")}/stac/collections/${ + row.id + }/items`, "_blank" ) .focus(); diff --git a/src/essence/Basics/Map_/Map_.js b/src/essence/Basics/Map_/Map_.js index f612abc0..bded0304 100644 --- a/src/essence/Basics/Map_/Map_.js +++ b/src/essence/Basics/Map_/Map_.js @@ -899,7 +899,9 @@ async function makeTileLayer(layerObj) { case 'stac-collection': splitColonType = splitColonLayerUrl[0] const splitParams = splitColonLayerUrl[1].split('?') - layerUrl = `/titilerpgstac/collections/${ + layerUrl = `${window.location.origin}${( + window.location.pathname || '' + ).replace(/\/$/g, '')}/titilerpgstac/collections/${ splitParams[0] }/tiles/${ layerObj.tileMatrixSet || 'WebMercatorQuad'