|
|
02-12-2024, 12:06
|
#1
|
Registered User
Join Date: May 2018
Location: Urbanna, VA
Boat: Lagoon 380 PC Limited Edition
Posts: 443
|
Hide Way Point Names
Is there a way to hide way point names without having to do it each time I open up a route that I have imported. I want the route, but don't want to see the way point names. So far what I have found is to right click on the route and then hide the names, but I would rather they were hidden by default.
Thanks
Cheyne
|
|
|
03-12-2024, 02:27
|
#2
|
Registered User
Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,419
|
Re: Hide Way Point Names
Cheyne..
If I, when the cursor is located on the route, by the canvas right click menu select "Hide Waypoint Names" it's saved and the names are not shown at next OCPN start.
Is it not the same for you? I've O v 5.10.2 on Windows
|
|
|
03-12-2024, 06:02
|
#3
|
Registered User
Join Date: May 2018
Location: Urbanna, VA
Boat: Lagoon 380 PC Limited Edition
Posts: 443
|
Re: Hide Way Point Names
I'm running 5.10.2 on Win11. While I can hide a route waypoint name and they stay hidden on the next launch when I open another route I have to hide the name for the new route. What I'm after is never having the route names show up unless I right click and unhide them. On the waterways I'm running on with the names not hidden it looks like trash at best. On the rivers I might have 30 waypoints in just a quarter mile to get around a corner.
Cheyne
|
|
|
04-12-2024, 04:49
|
#4
|
Registered User
Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 329
|
Re: Hide Way Point Names
You can do this with a script in the JavaScript plugin.
Below is a sample script to get you going. You can develop this for your exact requirements.
What this script does- Works through each route in OpenCPN
- Works through each point in a route
- Sets its isNameVisible attribute to false
- Makes a note it has processed this route by appending the script name to the route description
- Updates the route in OpenCPN
By marking which routes it has updated, the script can be run repeatedly and it will leave alone those that it has already processed. So if you subsequently make a mark visible again, it will be left alone.
This script compiles OK but I have not tested it further as I do not want to mess with my 379 routes.
Code:
scriptName = "Hide Names";
routeGuids = OCPNgetRouteGUIDs();
updateCount = 0;
for (r = 0; r < routeGuids.length; r++){ // for each route
route = OCPNgetRoute(routeGuids[r]);
if (route.description.indexOf(scriptName) >= 0) break; // have done this one
for (p = 0; p < route.waypoints.length; p++){ // for each point in route
route.waypoints[p].isNameVisible = false; // hide name
}
route.description += (" " + scriptName);
updateCount++;
OCPNupdateRoute(route);
}
print(updateCount, " routes updated; ",
routeGuids.length-updateCount, " routes unchanged\n");
__________________
If all else fails, read the instructions.
|
|
|
04-12-2024, 05:10
|
#5
|
Registered User
Join Date: May 2018
Location: Urbanna, VA
Boat: Lagoon 380 PC Limited Edition
Posts: 443
|
Re: Hide Way Point Names
I'm looking for a check box to hide waypoint names. I litterally have no idea what you just posted. Thanks for posting as it might help someone.
Cheyne
|
|
|
04-12-2024, 05:14
|
#6
|
Registered User
Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 329
|
Re: Hide Way Point Names
Quote:
Originally Posted by Cheyne
I'm looking for a check box to hide waypoint names. I litterally have no idea what you just posted. Thanks for posting as it might help someone.
Cheyne
|
It is not difficult. Install the JavaScript plugin, copy the script into the script pane and press run. It will do what you want.
If you load another one of these routes, just run the script again.
__________________
If all else fails, read the instructions.
|
|
|
04-12-2024, 05:16
|
#7
|
Registered User
Join Date: May 2018
Location: Urbanna, VA
Boat: Lagoon 380 PC Limited Edition
Posts: 443
|
Re: Hide Way Point Names
We would have to start with what is Javascript. I'm assuming some kind of programming thing. This isn't a science experiment. Just trying to replace Navionics with OpenCPN and in Navionics the waypoints don't show names.
Cheyne
|
|
|
04-12-2024, 08:17
|
#8
|
Registered User
Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,419
|
Re: Hide Way Point Names
Cheyne...
Try this to set "no name" as default for new WPs:
|
|
|
04-12-2024, 08:20
|
#9
|
Registered User
Join Date: May 2018
Location: Urbanna, VA
Boat: Lagoon 380 PC Limited Edition
Posts: 443
|
Re: Hide Way Point Names
Let me give that a try. Thanks.,
Cheyne
|
|
|
08-12-2024, 00:53
|
#10
|
Registered User
Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 524
|
Re: Hide Way Point Names
There is no checkbox to easy switch visibility. No idea of the java script will work, but you might also:
In the route manager export the route. You get a 'gpx' file from the route. Make somewhere a backup copy of this file!!
Open the route.gpx in an editor, will look something like
Code:
......
<rtept lat="53.365889227" lon="6.066872774">
<time>2024-12-08T07:24:51Z</time>
<name>002</name>
<sym>empty</sym>
<type>WPT</type>
<extensions>
<opencpn:guid>327cc6e0-de89-4284-9f64-7229699e9b8b</opencpn:guid>
<opencpn:auto_name>1</opencpn:auto_name>
<opencpn:viz_name>1</opencpn:viz_name>
<opencpn:arrival_radius>0.050</opencpn:arrival_radius>
<opencpn:waypoint_range_rings visible="false" number="0" step="1" units="0" colour="#FF0000" />
<opencpn:scale_min_max UseScale="false" ScaleMin="2147483646" ScaleMax="0" />
</extensions>
</rtept>
<rtept lat="53.381829968" lon="6.076092956">
.......
Then do a search/replace on the "<opencpn:viz_name>1</opencpn:viz_name>" part and change the '1' into '0'. Save the file and import in OpenCPN. Dont forget to delete the 'old' route in O otherwise you endup with double routes.
If there are no lines in your gpx with '<opencpn:viz_name>1</opencpn:viz_name>' you may insert them.
A small example of a route with only one waypoint name visible.
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
|
|
|
08-12-2024, 01:07
|
#11
|
Registered User
Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 524
|
Re: Hide Way Point Names
As alternative but more cumbersome way you can change single routepoints.
Open route manager-->Properties. Then in properties window right click on routepoint to change. Go to extended waypoint properties and there is your checkbox
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
|
|
|
08-12-2024, 04:36
|
#12
|
Registered User
Join Date: May 2018
Location: Urbanna, VA
Boat: Lagoon 380 PC Limited Edition
Posts: 443
|
Re: Hide Way Point Names
Both of those are horrible suggestions. What I want is a way to never see the names without any intervention on my part. The minute you said open a file and edit it you lost me.
Cheyne
|
|
|
14-12-2024, 05:30
|
#13
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 18,123
|
Re: Hide Way Point Names
So why not make a feature request or RFE (Request for Enhancement) with some detail about what you would like for and where in the menu system you think the control should be?
This kind of help might eventually yield a resolution for you.
Alternatively, the Javascript plugin might provide a quicker solution, but the Plugin API may not be prepared for that kind of control.
Quote:
Originally Posted by Cheyne
Both of those are horrible suggestions. What I want is a way to never see the names without any intervention on my part. The minute you said open a file and edit it you lost me.
Cheyne
|
|
|
|
14-12-2024, 19:02
|
#14
|
Registered User
Join Date: Aug 2009
Location: Onboard, currently cruising in SE Asia
Boat: St. Francis 44 Mk II (Catamaran)
Posts: 257
|
Re: Hide Way Point Names
Interesting.
Windows 10, OpenCPN 5.10.2-0, I am not seeing waypoint names, either in a route I just now created or in routes I have created before.
I imported a route created in 2021, and the route point names don't show.
But I imported a route created in 2015, and the route point names DO show.
Ahh, but looking more closely at the route points (by opening the gpx file in a text editor), the difference is, the 2015 route had
<opencpn:viz_name>1</opencpn:viz_name>
on each of the route points. Whether this was done by my friend who created that route, or was the default in a much earlier version of OpenCPN, I don't know.
But currently, creating a new route, on my system, the default is that route point names are not visible.
|
|
|
15-12-2024, 07:06
|
#15
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 18,123
|
Re: Hide Way Point Names
Tony has the simple answer I think. Use Javascript plugin and his script.
See Post 6 https://www.cruisersforum.com/forums...ml#post3954657
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|