0

I use this CSS code on GeoServer, for displaying name of populated places (cities, towns, etc):

 [@scale <10000000] [place = 'city'][capital = 'yes']{

      label: [name];
      fill: #dadada;
      /*fill-opacity: 0.3;*/
      font-size: 14;
      font-style: bold;
      font-familly: DejaVu Sans;
    }

    [@scale <5000000] [place = 'city']{

      label: [name];
      fill: #dadada;
      /*fill-opacity: 0.3;*/
      font-familly: DejaVu Sans;
    }

    [@scale <1000000] [aeroway='aerodrome']{

      label: [name];
      fill: #dadada;
      /*fill-opacity: 0.3;*/
      font-familly: DejaVu Sans;
    }

    [@scale <500000] [place='town']{

      label: [name];
      fill: #dadada;
      /*fill-opacity: 0.3;*/
      font-familly: DejaVu Sans;
    }



    [@scale <500000] [place='suburb'] [place = 'villagge']{

      label: [name];
      fill: #dadada;
      /*fill-opacity: 0.3;*/
      font-familly: DejaVu Sans;
    }


    [@scale <150000] [place='neighbourhood'][place='hamlet'][place='isolated_dwelling'] [place='allotments'][place='neighbourhood']{

      label: [name];
      fill: #dadada;
      /*fill-opacity: 0.3;*/
      font-familly: DejaVu Sans;
    }

    [@scale <150000] [place='quarter'][place='locality']{

      label: [name];
      fill: #dadada;
      /*fill-opacity: 0.3;*/
      font-familly: DejaVu Sans;
    }

CSS code is valid (is OK), and data really exists in PostgreSQL source. But it works only some part of tags for example this is works:

[@scale <10000000] [place = 'city'][capital = 'yes']{

          label: [name];
          fill: #dadada;
          /*fill-opacity: 0.3;*/
          font-size: 14;
          font-style: bold;
          font-familly: DejaVu Sans;
        }

and this part doesn't display:

[@scale <5000000] [place = 'city']{

          label: [name];
          fill: #dadada;
          /*fill-opacity: 0.3;*/
          font-familly: DejaVu Sans;
        }

What is wrong?

Points don't display on default GeoServer OpenLayers viewer too...

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.