[Mapserver-users] Changing status of a layer change map background color ???

Stéphane RIFF stephane.riff at cerene.fr
Mon Mar 22 03:21:47 EST 2004


    When i changed the status of layer ("Numero_Departements" see 
below)  to OFF, the background color of my map change...
When i turn back the status of the same layer to ON the background color 
is restored...

Here is my map file :

      #
# Start of map file
#
NAME CRN
STATUS ON
SIZE 600 600
EXTENT 47673.624 1616618.5 1197873.624 2677218.5
UNITS METERS
SHAPEPATH "../data"
IMAGECOLOR 80 80 80
TRANSPARENT OFF
SYMBOLSET "../symbols/symbols.sym"
FONTSET "../fonts/font.list"

IMAGETYPE PNG


#
# Start of web interface definition
#
WEB
  MINSCALE 5000
  MAXSCALE 100000000
  IMAGEPATH "/var/mapserver/www/tmp/"
  IMAGEURL "/tmp/"
  #ERROR "/mapServ/error.html"
  METADATA
    WMS_SRS "EPSG:27582"
  END
END

QUERYMAP
  SIZE -1 -1
  STATUS ON
  STYLE HILITE
  COLOR 255 255 0
END


#
# Start of reference map
#
REFERENCE
  STATUS ON
  EXTENT -2646.55843466 1564942.61318 1257407.47103 2722306.80918
  IMAGE ../img/nrefmap.png
  SIZE 115 106
  OUTLINECOLOR 0 0 255
  COLOR -1 -1 -1
END
#
# Start of legend
#
LEGEND
  STATUS ON
  KEYSIZE 18 12
END

#
# Start of scalebar
#
SCALEBAR
  IMAGECOLOR 80 80 80
  LABEL
    COLOR 255 255 255
    SIZE tiny
  END
  STYLE 1
  SIZE 600 2
  COLOR 255 255 255
  UNITS KILOMETERS
  INTERVALS 6
  TRANSPARENT FALSE
  STATUS ON
END

#
# Start of layer definitions
#

LAYER
  NAME "250000"
  TILEINDEX "250000"
  TILEITEM "LOCATION"
  TYPE RASTER
  STATUS OFF
  OFFSITE 0
  MAXSCALE 500000
  GROUP "Images"
  CLASS
    NAME "Fond Raster 250000"
  END
  METADATA
    LYRNAME "250000"
    WMS_SRS  "EPSG:27582"
    QUERYING_FILEDS ""
    WMS_ORDER "0"
  END
END

LAYER
  CONNECTIONTYPE postgis
  NAME "Contour_France"
  CONNECTION "host=localhost dbname=mapserver port=5432 user=nobody"
  DATA "the_geom from giscontourfrance"
  TYPE LINE
  STATUS ON
  GROUP "Contour"
  HEADER blank.html
  FOOTER blank.html
  CLASS
    NAME "Contour_France"
    SYMBOL "dashline"
    COLOR 0 153 255
    SIZE 3
  END

  METADATA
    LYRNAME "France"
    TABLE_NAME "giscontourfrance"
    RESULT_FIELDS ""
    QUERYABLE_FIELDS ""
    WMS_SRS  "EPSG:27582"
    WMS_ORDER "1"
  END

END

LAYER
  CONNECTIONTYPE postgis
  NAME "Contour_Departements"
  CONNECTION "host=localhost dbname=mapserver port=5432 user=nobody"
  DATA "the_geom from giscontourdepartement"
  TYPE LINE
  STATUS ON
  MAXSCALE 100000000
  MINSCALE 450000
  GROUP "Contour"
  HEADER blank.html
  FOOTER blank.html
  CLASS
   NAME "Contour_Departements"
   COLOR 255 128 64
  END
  METADATA
   LYRNAME "Départements"
   TABLE_NAME "giscontourdepartement"
   RESULT_FIELDS ""
   QUERYABLE_FIELDS ""
   WMS_SRS  "EPSG:27582"
   WMS_ORDER "2"
  END
END

LAYER
  CONNECTIONTYPE postgis
  CONNECTION "host=localhost dbname=mapserver port=5432 user=nobody"
  DATA "the_geom from giscontourcommune"
  NAME "Contour_Communes"
  TYPE POLYGON
  STATUS ON
    MINSCALE 5000
  MAXSCALE 450000
  GROUP "Contour"
  HEADER "blank.html"
  FOOTER "blank.html"
  LABELITEM "nom_comm"
  CLASS
    NAME "Contour_Communes"
    OUTLINECOLOR 250 194 5
    SIZE 4
    SYMBOL "dashline"
    LABEL
     TYPE TRUETYPE
     FONT "Arialbd"
     buffer 1
     outlinecolor 255 255 255
     COLOR 0 0 255
     POSITION CC
     SIZE 10
    END
  END

  METADATA
    LYRNAME "Communes"
    TABLE_NAME "giscontourcommune"
    RESULT_FIELDS ""
    QUERYABLE_FIELDS ""
    WMS_SRS  "EPSG:27582"
    WMS_ORDER "3"
  END
END


LAYER
  CONNECTIONTYPE postgis
  CONNECTION "host=localhost dbname=mapserver port=5432 user=nobody"
  DATA "the_geom from gistxtdepartement"
  NAME "Numero_Departements"
  TYPE POINT
  STATUS OFF
  MAXSCALE 100000000
  MINSCALE 450000
  GROUP "Texte"
  LABELITEM "textstring"
  HEADER blank.html
  FOOTER blank.html
  CLASS
    NAME "Numero_Departements"
    COLOR 244 190 80
    SIZE 8
    SYMBOL "point1"
    LABEL
      TYPE TRUETYPE
      FONT "Arialbd"
      BUFFER 1
      outlinecolor 255 255 0
      COLOR 255 0 0
      POSITION CC
      SIZE 8
      PARTIALS TRUE
      FORCE TRUE
    END
  END
 METADATA
    LYRNAME "N° de Départements"
    TABLE_NAME "gistxtdepartement"
    RESULT_FIELDS ""
    QUERYABLE_FIELDS ""
    WMS_SRS "EPSG:27582"
    WMS_ORDER "5"
  END
END


LAYER
  CONNECTIONTYPE postgis
  NAME "Affaires"
  CONNECTION "host=localhost dbname=budgeo port=5432 user=nobody"
  DATA "the_geom from gestion"
  TYPE POINT
  STATUS ON
  GROUP "Budgeo"
  HEADER blank.html
  FOOTER blank.html
  SYMBOLSCALE 450000
  CLASS
    NAME "Non Faisable"
    EXPRESSION ([etat] = 1)
    SIZE 8
    SYMBOL "triangle"
    COLOR 255 128 64
    TEMPLATE "../templates/itemquery_template.html"
  END
  CLASS
    NAME "Faisable"
    EXPRESSION ([etat] = 2)
    SIZE 8
    SYMBOL "star"
    COLOR 172 47 59
    TEMPLATE "../templates/itemquery_template.html"
  END
  CLASS
    NAME "En cours"
    EXPRESSION ([etat] = 3)
    SIZE 8
    SYMBOL "flag"
    COLOR 0 255 0
    TEMPLATE "../templates/itemquery_template.html"
  END
  CLASS
    NAME "Fait"
    EXPRESSION ([etat] = 4)
    SIZE 8
    SYMBOL "point1"
    COLOR 255 255 0
    TEMPLATE "../templates/itemquery_template.html"
  END
  CLASS
    NAME "Archivée"
    EXPRESSION ([etat] = 5)
    SIZE 8
    SYMBOL "point1"
    COLOR 255 0 0
    TEMPLATE "../templates/itemquery_template.html"
  END 

  METADATA
   LYRNAME "Affaires"
   TABLE_NAME "gestion"
   RESULT_FIELDS "affaire lot mission"
   QUERYABLE_FIELDS "affaire lot mission"
   WMS_SRS  "EPSG:27582"
   WMS_ORDER "6"
  END

END

END # Map File




More information about the mapserver-users mailing list