I used tracks to draw Traffic Separation Schemes, Prohibited Areas and Firing Ranges (all equally important as shoreline) as well as outlines and status of paper charts making up Forums - Post 458229">various-IRJDSUNE9932123321222xxeww-folios .

I used routes to draw lat/lon grids.

I used waypoints to update charts with new nav marks and dangers as per Notices to Mariners, and to add Radio Call-In Points or to build a database of lights and locations, that I want to see on chart regardless of current scale.

Technically, all of these are standard nav objects to OCPN. About the only difference I want is their persistence and protection from change.

So, after some tweaking, the Route Manager gets a new tab - Layers. Anything imported into a Layer

- is not deletable
- is not modifiable

Objects created in Layers are not subject to Delete (incl. Delete All), Export nor are they saved into navobj.xml upon program termination.

Extended control allows (still to-do) selective show/hide on chart and in general nav objects listing, and deletion on a per-layer basis.

A Layer is a single GPX file, that can be prepared offline by any means.

In addition to a standard set of layers imported during startup from the /Layers subdirectory layers can be imported just for the current session by specifying a file in RM Dialog.

I still have to implement some of the buttons, but it starts to look quite promising.

Tore,
if you don't want to build from source (Compiling - Windows | Official OpenCPN Homepage - pretty easy once you succeed for the first time ) this patch will for sure make it to my personal set so I can provide you the binary I compile for my own purposes before the new features make it into an official release.

Regarding the transparent markers - what's the problem with making a transparent XPM and placing it in the UserIcons subfolder as shown on the attached screenshot? Or did I understand wrong what you mean?

Pavel

P.S. I don't have all the icons to share, just cropped the topmost one from your image, saved as transparent PNG with Paint.NET and issued

Attached is the working prototype of layers handling code, based at 2.3.1 1228.

I post it here, rather than to flyspray, since I expect perhaps some testing feedback before final integration.

Still to do:

- save/restore the state of layers visibility upon restarting OCPN. For this I shall wait until all functionality is frozen.
- fix deleting layers while a relevant Route or Wpt Properties Dialog is open... (I think also without Layers this is not always OK)

There is one bug, not directly related to layers, occuring when performing SetInvisible on tracks built with colors (i.e. having some non-default <sym> inside). I hope to fix that separately.

Piotr,
thanx for the code, attached is a small fix for a crash when no layers exist.
Will be back when I play with it a bit more.
Do you have your code in some public repository? Patching stuff on e.g. github is a bit more convenient and "flexible" than in a forum thread and at least mine and balp's opencpn code is already hosted there

Windows victims,
if you want to play with this feature, I've uploaded the compiled executeble at opencpn.exe - 4shared.com - online file sharing and storage - download
Try to replace the opencpn.exe in your installation folder. I hope it should work but of course can't give any warranty as my machine is definitely not an ordinary user's computer...
If it does not, I'm sorry, just throw it away and get back to the official executable of which I recommend to keep a backup

Thomas,
the Import/Export buttons are actually not tab specific, the attached patch restores their original functionality (the code looks like Pjotr intended to do so, just forgot to add some checks later so the import was actually not working at all)
Do we want to change that behavior? I think we don't as then we might have to import just the waypoint part of the gpx on the waypoint tab etc. to stay consistent (I see a lot of problems...).
I personally prefer the solution where Import/Export has nothing to do with the Layers tab (but maybe we should disable those buttons when this tab is selected)