Ticket #3063 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Can not remove the TEXT property in the CLASS object

Reported by: charlotted Owned by: aboudreault
Priority: normal Milestone: 5.2.1 release
Component: MapScript-PHP Version: 5.2
Severity: normal Keywords: TEXT property
Cc: dmorissette, assefa

Description (last modified by dmorissette) (diff)

Here is an example of a CLASS object. The TEXT property overrides the LABELITEM of the layer. Once we have created the TEXT with $oClass->settext("mytext"), we can not remove this text. So that's impossible to use the labelitem after the creation of the TEXT.

CLASS
      NAME "departement"
      LABEL
        ANGLE 0.000000
        ANTIALIAS TRUE
        FONT "Arial"
        MAXSIZE 256
        MINSIZE 4
        SIZE 8
        TYPE TRUETYPE
        BUFFER 0
        COLOR 0 0 0
        FORCE FALSE
        MINDISTANCE -1
        MINFEATURESIZE -1
        OFFSET 1 1
        PARTIALS TRUE
        POSITION CC
        SHADOWCOLOR 0 0 0
        SHADOWSIZE 0 0
      END
      STYLE
        ANGLE 360
        COLOR 232 246 9
        OPACITY 100
        SIZE 10
        SYMBOL "Carre"
      END
      TEXT " "
    END

Change History

Changed 4 years ago by dmorissette

  • cc dmorissette, assefa added
  • owner changed from mapserverbugs to aboudreault
  • description modified (diff)

We should support calling $oClass->setText(NULL) to unset the text property. Assigned to Alan.

A future enhancement for 6.0 would be to support setting most (all) string properties in all object classes to NULL the same way.

Changed 4 years ago by aboudreault

  • status changed from new to closed
  • resolution set to fixed

Now, if we pass an empty string OR a NULL parameter to the classObj->setText() method, the property will be removed.

Fixed and committed in r9381.

Note: See TracTickets for help on using tickets.