Skip to content

Commit

Permalink
Fix single Titiler COG url
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Feb 7, 2025
1 parent 1084a1b commit 06953b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/essence/Basics/Layers_/Layers_.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ const L_ = {
},
getUrl: function (type, url, layerData) {
let nextUrl = url
if (nextUrl.startsWith('COG:')) nextUrl = nextUrl.slice(4)
if (!F_.isUrlAbsolute(nextUrl)) {
nextUrl = L_.missionPath + nextUrl
}
Expand All @@ -259,8 +260,9 @@ const L_ = {
nextUrl = `../../${nextUrl}`
}
}
if (layerData && layerData.throughTileServer === true)
if (layerData && layerData.throughTileServer === true) {
nextUrl = `${window.location.origin}/titiler/cog/tiles/WebMercatorQuad/{z}/{x}/{y}.webp?url=${nextUrl}`
}
return nextUrl
},
//Takes in config layer obj
Expand Down

0 comments on commit 06953b6

Please sign in to comment.