Welcome to Radarspotting. Please login or sign up.

April 28, 2025, 09:31:30 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

Draw lines on VRS?

Started by JXB, October 26, 2022, 11:37:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JXB

Hi

Does someone in here know if it is possible to draw lines on the VRS map? If it is possible, how do I do that?

I would love to add SID/STAR and danger areas to the map.

rikgale

Yes it is possible. How you do it -  by adding an overlay layer to the leaflet map which VRS uses.

https://leafletjs.com/reference.html#polyline

If you look at the A2AA and radar overlays on my VRS (bottom left menu) these are done with polygon not a polyline, but the idea is the same.

Auto updated daily ZIP files on GitHub

JXB

Thank you very much Rikgale! I knew you would answer because you seems really good at VRS.  ;D

I checked your VRS and thats exactly how I want it to look. But there is nothing in your link about where I put the code (text document or something else? ) and how I get it into VRS.

Looking at the other plugin I use I can see it is HTML, should I put these codes in a HTML document and inject it in the Custom content plugin?

rikgale

Hey

Yes, you would need to create an HTML file and injected it as custom content.

Which other plugin do you use?

R :)

Auto updated daily ZIP files on GitHub

JXB

Thank you!

I use Infopopup so I get the big info window on the map when clicking an aircraft and I also use Waypoints-master to display waypoints on the map.

rikgale

Would you mind posting a link to those please? I have not come across them before.

I'll take a gander and I might be able to give you pointers (if you need them) - I am not a programmer by any strectch of the imagination and easily get lost/stuck.

Currently I am using a heavily modded fork of https://github.com/M7SPI/vrs-overlays to drive the overlays on my VRS. If you are intersted in having a poke about I'll zip up my fork and send it to you. Currently on a private repo as it's not really finished, even though it works I don't have the time/inclination at the moment to round off the rough edges.

Auto updated daily ZIP files on GitHub

JXB

From looking at your VRS I think you already use the waypoint one: https://github.com/sam210723/vrs-waypoints

The info popup makes the same info window as there is if you change to Mobile Version. It is called infopopup.sh and it was in the VRS forum which is gone now, so unfortunately I have no link to it anymore.

I would be very happy to have a look at your fork because I am pretty sure I have to write something else in the HTML file than just coordinates to make it work. You say you are no programmer but looking at your VRS tells me that you are 1000% more clever about coding than I am.  8)

rikgale

Ok, yes the way points seem to be part of the script that I forked.

I would presume that if you are using infopopup that you have all the required files on your PC/Pi ;) May be you could ZIP them all up and email them to me as I would be interested in taking a look at that one.

rikgale at hotmail dot com

If you pm me your email I'll try and get the files over to you when I am back at home. I need to make a couple of tweaks to remove my hard coded OpenAIP and Weather keys.

Auto updated daily ZIP files on GitHub

JXB