I have a feature layer of road polylines. I would like to select the type of roads displayed on my client as a result of scale level.

For example:

At scale 100000 I would like to return only roads from type "primary".
At scale 50000 I would like to return only roads from type "primary" and "secondary".
At scale 25000 I would like to return only roads from type "primary" and "secondary" and "tertiary".

I know how to write a query that does this - I only need to know how to reflect the scale in this query. Is there any way the SQL statement 'knows' how to read the current scale from the client?

I've been searching and found that it is possible through the use of Query Layer but I don't want a Query layer. I already have that one layer and that's all I need.

  • 4
    Map scale is a property of a canvas, not a layer. Your solution is to create three layers, and set scale dependency on each. – Vince Jan 22 at 14:00
  • I'm asking this question because I've already tried the solution you suggested. The result was too many requests to the server and a heavy price on performance (camera is always moving). the purpose of this request is to show more information as we get closer to the ground. Do you have a different approach than what I've been trying to do? – Oren_C Jan 22 at 14:44
  • 3
    Your objection doesn't make sense. Properly done, scale dependency should draw at most one layer, so there shouldn't be any additional burden. It is not possible to do what you ask. Note that your example has two scales at the same breakpoint. – Vince Jan 22 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.