Page 1 of 1

Custom Polygon with leaflet maps

Posted: Sat Jan 12, 2019 6:10 pm
by 4flyer
I am wanting to make some custom polygon overlays for leaflet maps. The reason is to overlay the outlines of a flight training practice area on the map. The problem is that I do not know how to do this. I see that you can can do this fairly easily (https://leafletjs.com/examples/quick-start/) but I have no idea how to implement it into VRS. Could anybody lend me some help? Thanks!

Re: Custom Polygon with leaflet maps

Posted: Sun Jan 13, 2019 10:31 am
by UA4WIY

Re: Custom Polygon with leaflet maps

Posted: Sun Jan 20, 2019 1:14 pm
by iroquois
Kind friend UA4WIY I was very fascinated by the work on your planeradar / virtual radar
and I would be very grateful if you could share some of your wonderful plug in with us aviation and VRS enthusiasts
simply and explicitly. Thank you for your attention I follow you both on twitter and on SDR and send my best regards,
Frank

Re: Custom Polygon with leaflet maps

Posted: Thu May 16, 2019 6:24 am
by 4flyer
UA4WIY wrote:
Sun Jan 13, 2019 10:31 am
You can make a geojson and connect it with leaflet .
https://leafletjs.com/reference-1.4.0.html#geojson
https://leafletjs.com/examples/geojson/
Thanks for the input. I can understand how to take example scripts and create the scripts that I want but how would I connect it to Leaflet and VRS? Thanks!

Re: Custom Polygon with leaflet maps

Posted: Sun May 19, 2019 10:36 pm
by agw
You need to install the custom content plugin (documentation here: http://www.virtualradarserver.co.uk/doc ... omContent/) and then follow the instructions in the documentation to add a script to the site's web pages.

A sample script that shows how to obtain the native Leaflet or Google Maps handles can be found here: https://github.com/vradarserver/vrs-cus ... andle.html