-
Notifications
You must be signed in to change notification settings - Fork 8
Add tracks support #10
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
Open
tkurki
wants to merge
18
commits into
vokkim:master
Choose a base branch
from
tkurki:tracksserver-sk-featurecollection
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
931d843
Add IDEA project files to .gitignore
chacal d7ff337
Add track-connection and geojson-trackserver provider
chacal e61ffc7
Add dummy track server provider for testing purposes
chacal 67d2b77
Add vesselId parameter to daily track server provider
chacal 40a9f75
Refactor passing configuration
chacal 4858ae7
Add support for optional basic auth authentication to Api.get
chacal 8d11d3b
Use basic auth with track server if username and password are set
chacal 8ce64ed
Rename connection -> dataConnection
chacal 89321c3
Create and pass trackConnection to map
chacal f14d7a8
Render tracks using given track-connection
chacal fd661e2
Add daily colours for tracks
chacal 517a38e
Highlight a track by clicking it
chacal 75fb396
Add "tracks" segment to sample client configuration
chacal e202c91
feature: add Signal K trackserver support
tkurki a9b4512
feature: change track format to GeoJSON FeatureCollection
tkurki 892e48d
fix: merge problem with renaming
tkurki 6e834c6
feature: add support for rendering data on top of tracks
tkurki 76f7924
feature: fetch units from the server
tkurki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ public/bundle.js.map | |
| .bundle.css | ||
| npm-debug.* | ||
| client-config.json | ||
| .idea | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import api from './api' | ||
|
|
||
| function initialize({address, vesselId, username, password}) { | ||
| return { | ||
| queryTracks | ||
| } | ||
|
|
||
| function queryTracks(bbox) { | ||
| return api.get({ | ||
| url: `${address}/${vesselId}/daily-tracks?bbox=${bbox.toBBoxString()}`, | ||
| basicAuth: !!username && !!password ? {username, password} : undefined | ||
| }) | ||
| } | ||
| } | ||
|
|
||
|
|
||
| module.exports = initialize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| import Bacon from 'baconjs' | ||
|
|
||
| function initialize() { | ||
| return { | ||
| queryTracks | ||
| } | ||
|
|
||
| function queryTracks() { | ||
| return Bacon.once([{ | ||
| "date": "2015-09-12T21:00:00.000Z", | ||
| "route": { | ||
| "coordinates": dummyTrack, | ||
| "type": "LineString" | ||
| } | ||
| }]) | ||
| } | ||
| } | ||
|
|
||
| module.exports = initialize | ||
|
|
||
|
|
||
| const dummyTrack = [ | ||
| [24.92908833, 60.16096], | ||
| [24.92874333, 60.16108333], | ||
| [24.92775667, 60.16093667], | ||
| [24.92695333, 60.16033], | ||
| [24.92484333, 60.15942], | ||
| [24.92451833, 60.15845], | ||
| [24.92474833, 60.15717167], | ||
| [24.92463167, 60.15614167], | ||
| [24.923115, 60.15368833], | ||
| [24.91990167, 60.15086333], | ||
| [24.91928333, 60.15006333], | ||
| [24.91914333, 60.14961833], | ||
| [24.91963333, 60.148935], | ||
| [24.91681333, 60.14681333], | ||
| [24.91295667, 60.14484167], | ||
| [24.911985, 60.14418667], | ||
| [24.91068833, 60.14295167], | ||
| [24.90756333, 60.13916], | ||
| [24.90702333, 60.13768833], | ||
| [24.90621667, 60.12825333], | ||
| [24.90563, 60.12466167], | ||
| [24.90499667, 60.122085], | ||
| [24.90439333, 60.11776333], | ||
| [24.903615, 60.11370167], | ||
| [24.90346833, 60.11191833], | ||
| [24.90361833, 60.111485], | ||
| [24.90347, 60.11123333], | ||
| [24.89799167, 60.10720333], | ||
| [24.89496333, 60.10476667], | ||
| [24.886915, 60.09952167], | ||
| [24.881305, 60.09628833], | ||
| [24.87474167, 60.09287], | ||
| [24.87222833, 60.092015], | ||
| [24.86859, 60.09202833], | ||
| [24.86418833, 60.09156333], | ||
| [24.861075, 60.09156833], | ||
| [24.85545667, 60.09123333], | ||
| [24.82868167, 60.092265], | ||
| [24.82256, 60.093525], | ||
| [24.80822833, 60.09555333], | ||
| [24.806815, 60.09742667], | ||
| [24.80533833, 60.09978167], | ||
| [24.804705, 60.10182167], | ||
| [24.80423833, 60.10438667], | ||
| [24.80378167, 60.10836], | ||
| [24.802325, 60.11174167], | ||
| [24.80118167, 60.11354333], | ||
| [24.80063333, 60.11473833], | ||
| [24.79798, 60.11574833], | ||
| [24.79440667, 60.11672167], | ||
| [24.78841667, 60.117675], | ||
| [24.78689167, 60.11805833], | ||
| [24.786635, 60.11830667], | ||
| [24.78680333, 60.118935], | ||
| [24.78824, 60.12085833], | ||
| [24.79051333, 60.12318333], | ||
| [24.79388667, 60.12534667], | ||
| [24.796865, 60.12681667], | ||
| [24.800175, 60.12871], | ||
| [24.801405, 60.12992333], | ||
| [24.80265667, 60.13165667], | ||
| [24.80341833, 60.13354167] | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring code from of the master branch inside a feature branch should be avoided. It's a PITA when it come to merge multiple branches. Refactoring process are bumpy enough to worth it's own branch :D.