Opened 16 years ago

Closed 13 years ago

#2670 closed defect (fixed)

MapScript needs a method to retrieve attribute binding settings.

Reported by: sdlime Owned by: jmckenna
Priority: normal Milestone: 5.6 release
Component: Documentation - MapServer Version: svn-trunk (development)
Severity: normal Keywords:
Cc: dmorissette, assefa, aboudreault, jmckenna, havatv

Description (last modified by dmorissette)

As it sits if you set a binding programmatically, like so:

  $label->setBinding(MS_LABEL_BINDING_ANGLE, 'myitem');

or in a map file there is no way to get at the column name. We'd need a getBinding method in MapScript so you could do something like:

  $label->setBinding(MS_LABEL_BINDING_ANGLE, 'myitem');
  $item = $label->getBinding(MS_LABEL_BINDING_ANGLE);

Where $item would contain the text 'myitem'.

Steve

Attachments (1)

bug2670.patch (9.0 KB ) - added by aboudreault 16 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by dmorissette, 16 years ago

Cc: dmorissette added

We'll need to add the same thing in PHP MapScript.

comment:2 by dmorissette, 16 years ago

Cc: assefa added

comment:3 by dmorissette, 16 years ago

Description: modified (diff)

comment:4 by dmorissette, 16 years ago

Cc: aboudreault added

Steve, have you done this for SWIG already? If not then Alan can do it for both SWIG and PHP MapScript.

comment:5 by sdlime, 16 years ago

No, I've not done this. Feel free!

Steve

comment:6 by dmorissette, 16 years ago

Owner: changed from sdlime to aboudreault

Reassigning to Alan.

by aboudreault, 16 years ago

Attachment: bug2670.patch added

comment:7 by aboudreault, 16 years ago

Here's the patch for the getBinding method. I tested the swig interface with python.

comment:8 by dmorissette, 16 years ago

Cc: jmckenna added

Looks great Alan. Please commit to SVN trunk.

Adding Jeff to CC to notify him of an update to PHP MapScript docs.

comment:9 by aboudreault, 16 years ago

Component: MapScriptMapServer Documentation

Commited to SVN trunk in r8000

comment:10 by dmorissette, 16 years ago

Owner: changed from aboudreault to jmckenna

comment:11 by havatv, 13 years ago

Cc: havatv added
Resolution: fixed
Status: newclosed

Fixed for 6.0 and trunk in r12006. PHP documentation was already OK. Only updated the mapscript document with the methods (included all the methods I found in the label.i and style.i files - don't know if that was correct). Short explanation of the methods (taken from the PHP document) added in r12007.

Note: See TracTickets for help on using tickets.