Locus Map - forum

Content & Tools => Themes - Vector maps => Topic started by: karlchick on May 22, 2020, 18:19:38

Title: How to check when layer is not selected?
Post by: karlchick on May 22, 2020, 18:19:38
Is there a way to use layer options and apply things based on both when the layer is selected and something else when the layer of NOT selected?

In my OS Map theme I have an option to display road labels similar to OS maps as path text along the side of the road. For single carriage roads this works fine for both left and right drive maps/counties.

However, for dual carriage ways I have used a DY setting for the path text that places the road labels to the left of the road for left hand drive maps/countries. In right hand maps/countries the offset is wrong and the road labels appear on the roads instead of to the side:

(https://forum.locusmap.eu/index.php?action=dlattach;topic=6987.0;attach=7378;image)

The left is UK left hand traffic and the right is Germany rigth hand traffic with labels in wrong place...

I thought I would use a layer option to allow you to indicate if you want right hand traffic or not... if not, then I assume left hand traffic. I would then use a positive or negative DY offset based on selected or not:

(https://forum.locusmap.eu/index.php?action=dlattach;topic=6987.0;attach=7376;image)

Anyone know if this is possible?
thanks
Karl.

PS: Yes that is a v4 map and yes the OS Map theme for v4 maps is very close to ready...
Title: Re: How to check when layer is not selected?
Post by: john_percy on May 22, 2020, 18:49:22
The only way I know would be to do it with a layer for RH traffic, initially unselected, and a layer for LH traffic, initially selected. The user would have to deselect one and select the other - which isn't a good user experience. However the settings are sticky so the change would not be frequent.


Sent from my moto g(6) plus using Tapatalk