Opened 18 years ago

Last modified 18 years ago

#1951 new defect

Transparent color rgb(-1,-1,-1) not saved by the $map->save() function

Reported by: pgiannini@… Owned by: mapserverbugs
Priority: high Milestone:
Component: MapScript-PHP Version: 4.8
Severity: normal Keywords:
Cc: mapserver@…

Description

The function $map->save('new_mapfile.map') does not register the transparent
color  RGB(-1,-1,-1) in the 'new_mapfile.map' file.

part of .map file:
  layer	
    status  default
    type  polygon
    classitem  'CNTRYNAME'
    class
      expression  ('[CNTRYNAME]' EQ 'Germany')
      color  -1 -1 -1
      outlinecolor  20 200 20
    end
  end

part of .php documents:
  $layer = $map->getLayer(0);
  $class = ms_newClassObj($layer);  // new Class object 
  $class->setExpression("('[CNTRYNAME]' EQ 'Italy')");
  $style = ms_newStyleObj($class);  // new Style object in the new class
  $style->color->setRGB( 20,100,20); // colors for the new class
  $style->outlinecolor->setRGB( -1,-1,-1);
  $map->save('europa.debug.map');	 // save the debug .map file

part of the debug mapfile created:
  LAYER
    CLASSITEM "CNTRYNAME"
    DATA "europa"
    DEBUG ON
      METADATA
      END
    NAME "europa"
    PROJECTION
      "init=epsg:32632"
    END
    SIZEUNITS PIXELS
    STATUS DEFAULT
    TOLERANCEUNITS PIXELS
    TYPE POLYGON
    UNITS METERS
    CLASS
      EXPRESSION ('[CNTRYNAME]' EQ 'Germany')
      METADATA
      END
      STYLE
        ANGLE 360
        OUTLINECOLOR 20 200 20
        SYMBOL 0
      END
    END
    CLASS
      EXPRESSION ('[CNTRYNAME]' EQ 'Italy')
      METADATA
      END
      STYLE
        ANGLE 360
        COLOR 20 100 20
        SYMBOL 0
      END
    END
  END

Change History (1)

comment:1 by mapserver@…, 18 years ago

Cc: mapserver@… added
Note: See TracTickets for help on using tickets.