Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Swig MapScript for Multi-Label Support #4310

Closed
sdlime opened this Issue · 16 comments
@sdlime
Collaborator

Need to add methods for manipulating multiple label objects in the context of classObj's. Need to implement the RFC 24 reference counting as well (necessary attributes have been added to appropriate structures). styleObj support should serve as a pattern.

Steve

@sdlime sdlime was assigned
@sdlime
Collaborator

I added three new methods for a classObj in SWIG MapScript: getLabel, addLabel, removeLabel. They mirror the style support except that order is not important for labels so addLabel doesn't take an index and just adds the new label to the end. These are in the master.

Tamas, in class.i there were some C-Sharp specific directives around insertStyle that I wasn't sure if they applied here or not. Can you comment?

Steve

@szekerest
Collaborator

This change is required to update the object relationship for the c# garbage collector. Modified the code accordingly.

@tbonfort
Owner

@aboudreault , have the corresponding functions been added to php mapscript ?

@aboudreault
Collaborator

not yet. another thing to add to my todo list.

@aboudreault aboudreault was assigned
@aboudreault aboudreault referenced this issue from a commit
Alan Boudreault Swig/PHP mapscript for multi-label support (#4310) af74530
@aboudreault
Collaborator

In my commit:

  • Fix memory leak in msAddLabelToClass()
  • Add addLabel/removeLabel/getLabel in classObj of PHP MapScript
  • Add numlabels property in classObj in PHP Mapsciprt
  • Add labelObj capability to be instantiated. (was always embedded before) (PHP and SWIG)

I think we can close this ticket?

@sdlime
Collaborator
@aboudreault
Collaborator

it's done steve. Documentation is missing though...

@sdlime
Collaborator

Thanks man. Let's leave open untils docs get the update. Steve

@havatv havatv referenced this issue from a commit in mapserver/docs
Håvard Tveite Added mapscript documentation for multiple class label support (swig … ae0a68a
@havatv
Collaborator

I have updated mapscript documentation (mapscript/mapscript.txt and mapscript/php/index.txt) - mapserver/docs@ae0a68a.

Properties for class: numlabels added, label marked as removed.

Methods for class: addLabel, getLabel, removeLabel.

I have also updated two figures to indicate that multiple labels can be used for class.

If the update is OK, I hope that @aboudreault or @sdlime can close this bug. I can't.

@aboudreault
Collaborator

Thanks havatv!

@szekerest
Collaborator

labelObj.expression a labelObj.text is not exposed to mapscript. Also missing from the mapfile/mapscript documentation

@szekerest szekerest reopened this
@tbonfort tbonfort closed this
@havatv
Collaborator

@tbonfort, should something be done also for PHP mapscript? I could not find settext and setexpression in the 6.2 PHP code.

@mkofahl mkofahl referenced this issue from a commit in faegi/mapserver
@szekerest szekerest Expose labelObj.text and labelObj.expression (#4310) af528d3
@jmckenna
Collaborator

Reopening. LabelObj text and expression params are not exposed yet in PHP MapScript.

@jmckenna jmckenna reopened this
@tbonfort
Owner

not sure if this can be ready for 6.2.1 . @aboudreault ?

@aboudreault
Collaborator

will do tomorrow morning

@aboudreault
Collaborator

Fixed in branch-6-2 and master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.