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 )
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)
Change History (12)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
Cc: | added |
---|
comment:3 by , 16 years ago
Description: | modified (diff) |
---|
comment:4 by , 16 years ago
Cc: | added |
---|
Steve, have you done this for SWIG already? If not then Alan can do it for both SWIG and PHP MapScript.
by , 16 years ago
Attachment: | bug2670.patch added |
---|
comment:7 by , 16 years ago
Here's the patch for the getBinding method. I tested the swig interface with python.
comment:8 by , 16 years ago
Cc: | 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 , 16 years ago
Component: | MapScript → MapServer Documentation |
---|
Commited to SVN trunk in r8000
comment:10 by , 16 years ago
Owner: | changed from | to
---|
comment:11 by , 13 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
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.
We'll need to add the same thing in PHP MapScript.