Closed viisauksena closed 3 years ago
nice - didn't know about that config.json. will change this asap
For our community, the map does not live inside a webroot, which seems to break the locating of the nodes.json.
The map URL: https://freifunk-bs.de/map/
The config.json contains: "dataPath": "/output/",
, leading the meshviewer to https://freifunk-bs.de/output/nodes.json, which is the correct behaviour. This map however tries to access https://freifunk-bs.de/map/output/nodes.json. I hotfixed it, but it would be nice if the web paths would be generated correctly.
@StilgarBF what is the current state of this issue? The freifunk-karte seems to be doing something like that but it is not within the repository.
this has been implemented @kb-light
actualy de-map look in the api and take the first hit. In the case of meshviewer the de-map guesses that the backend data is in the same directory as the meshviewer itself - maybe do some more wild guessing when its not there. There is no standart where the backend data is layin around, in fact you can config it like you want, like its fitting to your settings. it feels like the right way for de-map should be to parse the config.json which is everytime inside the meshviewer folder, there you can easily find the backend-data source. And there de-map should take its data from - not by guessing. with this approach you guarantee that the comunity datasource and de-map data-source stays the same! While the meshviewer data is more maintained than some leftover files somewhere. (some comunities simply dont see the impact to de-map) (we had this issue in freiburg , that we had by "accident" some nodes.json file inside the meshviewer but do have our real backend-data somewhere else - where we think its better maintainable) . the config.json starts normaly straight with the position of the data - relative to the meshviewer
{ "dataPath": "../",