Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When new charts added no charts shown & "Charts Reload" not working #211

Closed
dirkwa opened this issue Nov 28, 2024 · 7 comments
Closed

When new charts added no charts shown & "Charts Reload" not working #211

dirkwa opened this issue Nov 28, 2024 · 7 comments

Comments

@dirkwa
Copy link

dirkwa commented Nov 28, 2024

I have on my SK v2.12.0 the freeboard-sk v2.12.2 and @signalk/charts-plugin v3.0.0

when use the charts plugin with one subdir everything is fine and works as expected.
Now I added a 2nd path and no chart is shown anymore but they are available via the API.

image

{
"Vanuatu_TCL2402_ArcGIS_Z13-16,18": {
"identifier": "Vanuatu_TCL2402_ArcGIS_Z13-16,18",
"name": "Vanuatu - ArcGIS, TCL2402, Z13-16&18",
"description": "Vanuatu - ArcGIS, TCL2402, Z13-16&18",
"bounds": [
166.46484375,
-20.30341752,
170.33203125,
-12.98314772
],
"minzoom": 12,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/Vanuatu_TCL2402_ArcGIS_Z13-16,18/{z}/{x}/{y}",
"chartLayers": []
},
"Vanuatu_TCL2402_BingSat_Z13-16,18": {
"identifier": "Vanuatu_TCL2402_BingSat_Z13-16,18",
"name": "Vanuatu - BingSat, TCL2402, Z13-16&18",
"description": "Vanuatu - BingSat, TCL2402, Z13-16&18",
"bounds": [
166.46484375,
-20.30341752,
170.33203125,
-12.98314772
],
"minzoom": 12,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/Vanuatu_TCL2402_BingSat_Z13-16,18/{z}/{x}/{y}",
"chartLayers": []
},
"Vanuatu_TCL2402_Navionics_Z13-16,18": {
"identifier": "Vanuatu_TCL2402_Navionics_Z13-16,18",
"name": "Vanuatu - Navionics, TCL2402, Z13-16&18",
"description": "Vanuatu - Navionics, TCL2402, Z13-16&18",
"bounds": [
166.46484375,
-20.30341752,
170.33203125,
-12.98314772
],
"minzoom": 12,
"maxzoom": 17,
"format": "png",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/Vanuatu_TCL2402_Navionics_Z13-16,18/{z}/{x}/{y}",
"chartLayers": []
},
"NewCaledonia.Z12 15 18.ArcGIS": {
"identifier": "NewCaledonia.Z12 15 18.ArcGIS",
"name": "NewCaledonia, ArcGIS, Z12 15 18",
"description": "Created by SAS.Planet",
"bounds": [
158.02734375,
-23.07973176,
172.265625,
-17.81145609
],
"minzoom": 11,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/NewCaledonia.Z12 15 18.ArcGIS/{z}/{x}/{y}",
"chartLayers": []
},
"NewCaledonia_Z12 15 18 BingSat": {
"identifier": "NewCaledonia_Z12 15 18 BingSat",
"name": "New Caledonia, BingSat, Z12 15 18",
"description": "Created by SAS.Planet",
"bounds": [
158.02734375,
-23.07973176,
172.265625,
-17.81145609
],
"minzoom": 11,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/NewCaledonia_Z12 15 18 BingSat/{z}/{x}/{y}",
"chartLayers": []
},
"NewCaledonia_Z12 15 18 GoogleSat": {
"identifier": "NewCaledonia_Z12 15 18 GoogleSat",
"name": "New Caledonia, GoogleSat, Z12 15 18",
"description": "Created by SAS.Planet",
"bounds": [
158.02734375,
-23.07973176,
172.265625,
-17.81145609
],
"minzoom": 11,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/NewCaledonia_Z12 15 18 GoogleSat/{z}/{x}/{y}",
"chartLayers": []
},
"NewCaledonia_Z12 15 18 Navionics": {
"identifier": "NewCaledonia_Z12 15 18 Navionics",
"name": "New Caledonia, Navionics, Z12 15 18",
"description": "Created by SAS.Planet",
"bounds": [
158.02734375,
-23.07973176,
172.265625,
-17.81145609
],
"minzoom": 11,
"maxzoom": 17,
"format": "png",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/NewCaledonia_Z12 15 18 Navionics/{z}/{x}/{y}",
"chartLayers": []
}
}

image

One thing I noticed is that in the newcaledonia folder the file names are inside a '' but linux ignores that ans says it is the same file.

image

to exclude this I renamed all the files in that dir:

image

Than I clicked on the plugin again "submit" to re-read the dir. The API now shows:

{
"Vanuatu_TCL2402_ArcGIS_Z13-16,18": {
"identifier": "Vanuatu_TCL2402_ArcGIS_Z13-16,18",
"name": "Vanuatu - ArcGIS, TCL2402, Z13-16&18",
"description": "Vanuatu - ArcGIS, TCL2402, Z13-16&18",
"bounds": [
166.46484375,
-20.30341752,
170.33203125,
-12.98314772
],
"minzoom": 12,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/Vanuatu_TCL2402_ArcGIS_Z13-16,18/{z}/{x}/{y}",
"chartLayers": []
},
"Vanuatu_TCL2402_BingSat_Z13-16,18": {
"identifier": "Vanuatu_TCL2402_BingSat_Z13-16,18",
"name": "Vanuatu - BingSat, TCL2402, Z13-16&18",
"description": "Vanuatu - BingSat, TCL2402, Z13-16&18",
"bounds": [
166.46484375,
-20.30341752,
170.33203125,
-12.98314772
],
"minzoom": 12,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/Vanuatu_TCL2402_BingSat_Z13-16,18/{z}/{x}/{y}",
"chartLayers": []
},
"Vanuatu_TCL2402_Navionics_Z13-16,18": {
"identifier": "Vanuatu_TCL2402_Navionics_Z13-16,18",
"name": "Vanuatu - Navionics, TCL2402, Z13-16&18",
"description": "Vanuatu - Navionics, TCL2402, Z13-16&18",
"bounds": [
166.46484375,
-20.30341752,
170.33203125,
-12.98314772
],
"minzoom": 12,
"maxzoom": 17,
"format": "png",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/Vanuatu_TCL2402_Navionics_Z13-16,18/{z}/{x}/{y}",
"chartLayers": []
},
"NewCal_ArcGis": {
"identifier": "NewCal_ArcGis",
"name": "NewCaledonia, ArcGIS, Z12 15 18",
"description": "Created by SAS.Planet",
"bounds": [
158.02734375,
-23.07973176,
172.265625,
-17.81145609
],
"minzoom": 11,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/NewCal_ArcGis/{z}/{x}/{y}",
"chartLayers": []
},
"NewCal_Bing": {
"identifier": "NewCal_Bing",
"name": "New Caledonia, BingSat, Z12 15 18",
"description": "Created by SAS.Planet",
"bounds": [
158.02734375,
-23.07973176,
172.265625,
-17.81145609
],
"minzoom": 11,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/NewCal_Bing/{z}/{x}/{y}",
"chartLayers": []
},
"NewCal_Navionics": {
"identifier": "NewCal_Navionics",
"name": "New Caledonia, Navionics, Z12 15 18",
"description": "Created by SAS.Planet",
"bounds": [
158.02734375,
-23.07973176,
172.265625,
-17.81145609
],
"minzoom": 11,
"maxzoom": 17,
"format": "png",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/NewCal_Navionics/{z}/{x}/{y}",
"chartLayers": []
},
"NewCal_google": {
"identifier": "NewCal_google",
"name": "New Caledonia, GoogleSat, Z12 15 18",
"description": "Created by SAS.Planet",
"bounds": [
158.02734375,
-23.07973176,
172.265625,
-17.81145609
],
"minzoom": 11,
"maxzoom": 17,
"format": "jpg",
"type": "tilelayer",
"scale": 250000,
"tilemapUrl": "/signalk/v1/api/resources/charts/NewCal_google/{z}/{x}/{y}",
"chartLayers": []
}
}

But Freeboard-SK is still not showing the charts, even pushing the "Reload Charts" button when selecting a chart.

Only a "SK Server Reload" brought all the charts.

@panaaj
Copy link
Member

panaaj commented Nov 29, 2024

Are there errors in the broswer console?... Freeboard uses the response from GET signalk/v2/api/resources/charts
If no charts are shown in the UI then there is an issue processing the response.

@dirkwa
Copy link
Author

dirkwa commented Nov 30, 2024

This is what my browser looked like when I deleted one folder in charts plugin and a) pressed submit and b) reloaded SK
image

So it looks like a V2 API issue.

image

** After SK Restart:**

image

@panaaj
Copy link
Member

panaaj commented Nov 30, 2024

The charts plugin requires a restart to read new chart files and paths.

There is a PR to address this (along with some other issues)
SignalK/charts-plugin#34

You can try this as a test?

@dirkwa
Copy link
Author

dirkwa commented Nov 30, 2024

How to apply that?

@panaaj
Copy link
Member

panaaj commented Nov 30, 2024

Download this file https://github.com/panaaj/charts-plugin/releases/download/v3.1.0-rc1/signalk-charts-plugin-3.1.0.tgz to the folder .signalk folder in your home directory.
and then on your server open a terminal...

cd ~/.signalk
npm i signalk-charts-plugin-3.1.1.tgz

@dirkwa
Copy link
Author

dirkwa commented Nov 30, 2024

You confused me a bit with v3.1.1

What I did:
wget https://github.com/panaaj/charts-plugin/releases/download/v3.1.0-rc1/signalk-charts-plugin-3.1.0.tgz
npm i signalk-charts-plugin-3.1.0.tgz

Than Restart SK

--> Everything works as expected !

@panaaj
Copy link
Member

panaaj commented Nov 30, 2024

Ooops... sorry re the typo.

Glad that seemed to fix it.... I will seek to get the charts-plugin update released.
This version detects when new files are placed in the chart folders and makes them available to new requests...saves having to restart the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants