Layers with same name but multiple scale in MapServer Mapfile

1.4k views Asked by At

I am using a mapfile which has a line layer with the same name repeating multiple times on different scales. Is it possible, I can get all the scales information in one layer rather than 15 layers. What and where exactly I need to change. Any hints, will be appreciated.Cheers, Ali

1

There are 1 answers

0
Javi Mollá On

Maybe you should have only LAYER and as many CLASSes as scales needed. For every class, put MINSCALEDENOM and MAXSCALEDENOM

For example:

LAYER
  NAME "mylayer"
  ...

  CLASS
    MINSCALEDENOM 0
    MAXSCALEDENOM 3000
    ...
  END

  CLASS
    MINSCALEDENOM 3000
    MAXSCALEDENOM 10000
    ...
  END

  CLASS
    MINSCALEDENOM 10000
    MAXSCALEDENOM 25000
    ...
  END

  CLASS
    MINSCALEDENOM 25000
    MAXSCALEDENOM 50000
    ...
  END
END