Comments (7)
The charts list is auto-populated by simply scanning the mapcache dir for sub-dirs. Hence it finds the mbtiles dirs but doesnt understand them. So yes it will need some adjustment
from freeboard-sk.
Thanks for speedy answer!
So I am looking for the addlayers.js file in my signalk-server-node install on a rpi3 but no joy. These .mbtiles files I understand to be SQLite dbs, correct? What kind of adjustment would I need to make?
from freeboard-sk.
Not sure - I havent tried using them. If you have js skills then google for openlayers3 and mbtiles - ol3 is the underlying map layer lib.
The code here will need adjustment to read the mbtiles data:
Lines 230 to 270 in 6217ff5
from freeboard-sk.
To a client application (a browser app like Freeboard) mbtiles charts are normal tiled charts: theSK Node server already takes care of digging out the chart metadata from the mbtiles file and serves the individual map tiles.
The response to /signalk/v1/api/resources/charts
will look something like this
{
"mbtiles-file-name.mbtiles": {
"identifier": "mbtiles-file-name",
"name": "Name from the mbtiles file",
"description": "Description from the mbtiles file",
"bounds": [
19.105224609375,
65.84776766596988,
27.88330078125,
59.645540251443215
],
"minzoom": 4,
"maxzoom": 15,
"format": "png",
"tilemapUrl": "/charts/mbtiles-file-name.mbtiles/{z}/{x}/{y}",
"type": "tilelayer",
"scale": "250000"
}
}
So you should be to change Freeboard code so that if server response already includes the necessary information no need to do the secondary http request, just construct the OpenLayers layer.
Btw have you tried tuktuk-chart-plotter, installable from SK Node Server's app store? It supports mbtiles out of the box (to be precise, the server's mbtiles code is mostly copypaste from tuk-tuk's internal server).
from freeboard-sk.
Thanks for the quick responses. I installed tuktuk from the appstore but ran into a permissions issue (signalk-server-node is running as 'pi' - not root). So I sshd to the machine and ran (as root) 'npm install tuktuk-chart-plotter'. Seems like success on install but configuration and start/stop is going to take me a bit. I do like the look of freeboard and so will investigate the js changes that need to be made, although Im no js guru
from freeboard-sk.
This is a sidetrack, but there should be no need for installing things as root. I assume you did at least part of your original installation as root and the trouble stems from that.
The easiest way to restart the SK server is to reboot the machine. Tuktuk needs no further configuration.
from freeboard-sk.
#51 adds support for mbtiles served fromresources/charts
from freeboard-sk.
Related Issues (20)
- Add support for skipping onboarding screen HOT 10
- AIS targets all have HOT 6
- VMG converting to knots is incorrect HOT 1
- User configurable option for temporal resolution on tracks HOT 7
- Host resource consumption HOT 12
- Lock zoom to map - Functionality request HOT 1
- Unable to add routes/waypoints HOT 3
- Make colour of AIS targets adjustable as it's not legible with satellite imagery HOT 2
- Load GPX not working HOT 2
- SK bootup error about Freeboad-SK permission HOT 5
- Cannot set Anchor Watch HOT 3
- Anchor Watch looping raising notifcations HOT 2
- Feature Request: Add Timestamp in the notification HOT 1
- unable to open playback connection HOT 1
- next Waypoint name on Route? HOT 2
- Longer timer for 'Other vessels' settings HOT 2
- Pypilot HOT 4
- Unable to Upload waypoints GPX HOT 5
- Excellent function "constrain map" button doesn't toggle
- Charts coverage overview. HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freeboard-sk.