Alignment of Point Feature Labels

srisri Global Mapper UserPosts: 12
edited March 2010 in SDK
I have point feature labels that are multi-lined and have found that they are left aligned by default, I'd like them to be centre aligned. I've tried to pad the aLabel string that is passed in to GM_SetFeatureLabel, however all the white space seems to be removed.

Is it possible to change the alignment of point feature labels?


  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2010
    You can use the GM_SetPointFeatureDrawStyle function to edit the drawing style for a point (use GM_GetPointFeature to initialize the draw style so you just change what you want). Change the mPlacement member of the GM_FontDef_t structure to one of the centered values, like GM_LABEL_CENTER, to center the text.

    Let me know if I can be of further assistance.


    Global Mapper Support
  • srisri Global Mapper User Posts: 12
    edited March 2010
    Hi Mike,

    Yes thanks, that works perfectly. It turns out that I was trying to alter the format of the string when mPlacement was set to GM_LABEL_AUTO.

    Thanks again,
Sign In or Register to comment.