Author Topic: How to check when layer is not selected?  (Read 60 times)

Online karlchick

  • More than Newbie
  • *
  • Posts: 27
  • Thanked: 25 times
    • View Profile
  • Device: Samsung Galaxy A3 2017
How to check when layer is not selected?
« 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:



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:



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...
« Last Edit: May 22, 2020, 18:44:08 by karlchick »
 
The following users thanked this post: Henk van der Spek

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 787
  • Thanked: 119 times
    • View Profile
  • Device: MotoG
Re: How to check when layer is not selected?
« Reply #1 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