-
Notifications
You must be signed in to change notification settings - Fork 240
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
[Feature] Ruler / Draw on Map #306
Comments
Very nice idea, I support this feature request. :-) |
I've wanted to try and do this for a while but couldn't figure it out. It'd be like ATC staff have on their displays and would be cool for better situational awareness. I'd love to see this but foresee it being difficult to integrate with scrolling and map clicking. Maybe a button up top to enter that mode? |
Well, I started to learn how to make a layer and draw on it, and now I've added a ruler button that turns the layer on and off and draws a dot at 0,0. Baby steps. This is helping me to learn the tar1090 flow too. I need to figure out where to add some click handlers to be able to draw on the map, though. |
Really one issue is where to put an extra button. I suppose the extra button can be enabled from the settings menu ... |
You're right. I am not running globe mode on my local install, so I had no replay button and could stick it there. Otherwise it'd just have to go next to it, and then that's 5 buttons on the top row: U/H/T/Replay/Ruler Other option is a button on the top left, somewhere untouched by other things right now. Although my ruler controls are currently displayed up there when you turn the ruler mode on, so that won't work for me during this testing. Could make it a drop down thing - but the problem with the design side is that there's too many possibilities with it. I am trying to match the design of the map as-is right now. Edit: Is this where the magic happens? I'll need to put in code to handle ruler mode here, and I expect I will need to modify the other clauses. Current idea I have right now is to disable everything else when in ruler mode (so selecting and deselecting planes, double click to follow etc) - not sure if you have opinions on this?
Edit: Seemingly it is! I can click the map and have some coordinates put into my little window. |
Got a working prototype going, but I don't think my code is really up to scratch. I will probably put it in a branch on my own fork. It also respects your DisplayUnits choice. Only issue is this looks awful on mobile and interferes with those buttons. Also 5 in a row doesn't look great on mobile (say, if Replay button is there). |
Now up on my repo, ruler branch. It's very shit. |
It would be great to utilise the Openlayers ruler code, to draw a line between two points on the map and measure the distance and bearing between them. For example, to measure how far an aircraft is from my location or another point, or the distance between two aircraft.
The text was updated successfully, but these errors were encountered: