Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

owsamahajjar
New Contributor

Is there a way to customize the 'Show in zoom levels' option for a layer on a Map, using an expression?

I'm trying to view a number of cities in different countries on a map with their data labels.

However, when zooming out to zoom X5 and above, the labels become unreadable.

is there an expression to be using in the "calculation condition" area of the Layer Display tab that can view them based on a set criteria. (i.e. another field that specifies if its a 'major' city, or 'secondary' city.


Something like this:

if([City size]="large", show in all zoom levels,

                              if([City size]="medium", show in zoom levels x1 to x5,
                                                                 if([City size]="Small", show in zoom levels x1 to x4,

                                                                                                                                            0)

Thanks you for your time.

Cheers,

Owsama

2 Replies

Re: Is there a way to customize the 'Show in zoom levels' option for a layer on a Map, using an expression?

Is that [City size] is the field which carries the Small, Medium and Large flags ???

owsamahajjar
New Contributor

Re: Is there a way to customize the 'Show in zoom levels' option for a layer on a Map, using an expression?

‌Hi Anil, thanks for asking!

Yes, in the example above the [city size]  field will have a value similar to “Small”, “Medium”, ”Large”, and ”Major”.

Cheers,

Owsama