Skip to content

Commit

Permalink
use BASE_URL properly
Browse files Browse the repository at this point in the history
  • Loading branch information
billyc committed Apr 11, 2024
1 parent 5a0b141 commit 7f7203c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<link href="/css/font-awesome-5.7.1.css" rel="stylesheet" />
<link href="/images/SW_favicon.png" rel="icon" type="image/png" />

<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@mdi/font@5.8.55/css/materialdesignicons.min.css"
/>

<!-- descriptive things -->
<title>SimWrapper</title>
<meta content="SimWrapper" name="twitter:title" />
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/matrix/H5MapViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ const MyComponent = defineComponent({
// hard-coded shapefile from /public folder, special treatment
const localPath = BASE_URL + url.substring(1) // no double-slash at beginning
console.log('LOADING LOCAL geojson:', localPath)
const blob = await fetch(shapeConfig).then(async r => await r.blob())
const blob = await fetch(localPath).then(async r => await r.blob())
const buffer = await blob.arrayBuffer()
const rawtext = gUnzip(buffer)
const text = new TextDecoder('utf-8').decode(rawtext)
Expand Down

0 comments on commit 7f7203c

Please sign in to comment.