Prepare charts moved from api server to here

route/api.js
   - new distriputer fpr chart preparation

appp.js
   - removed unnecessary calls

public/javascripts/map.js
   - changed /char/... call to /api/... call

charts/preparecharts
   - added

charts/utilities.js
   - added

public/javascripts/showcharts.js
   - changed /char/... call to /api/... call

routes/users.js
   - deleted
This commit is contained in:
rxf
2023-04-07 15:23:16 +02:00
parent cba929dac4
commit 22a6b9ab2c
7 changed files with 706 additions and 18 deletions
+2 -2
View File
@@ -165,7 +165,7 @@ export async function buildMarkers() {
west: bounds.getWest(), south: bounds.getSouth(),
east: bounds.getEast(), north: bounds.getNorth()
}
const url = `/chart/getmapdata?type=noise&box=${bounds.toBBoxString()}`
const url = `/api/getmapdata?type=noise&box=${bounds.toBBoxString()}`
let ret = await fetch(url)
.catch(e => {
@@ -265,7 +265,7 @@ async function setCenter(adr) {
// Show the last date below tha map grafics
async function showLastDate(ld) {
const url = `/chart/getmapdata?type=noise`
const url = `/api/getmapdata?type=noise`
let ret = await fetch(url)
.catch(e => {
console.log(e)