wiki:MapGuideRfc186

Version 1 (modified by jng, 23 months ago) ( diff )

--

MapGuide RFC 186 - Support label justification for basic stylization

This page contains a change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.

Status

RFC Template Version(1.0)
Submission Date5 Feb 2023
Last Modified5 Feb 2023
AuthorJackie Ng
RFC Statusdraft
Implementation Statuspending
Proposed Milestone4.0
Assigned PSC guide(s)(when determined)
Voting History(vote date)
+1
+0
-0
-1
no vote

Overview

This RFC proposes to add support for feature label justification in basic stylization mode

Motivation

This 14 year old bug (https://trac.osgeo.org/mapguide/ticket/772) is the result of the rendering/stylization engine having a hard-coded "Left" justification for feature labels in basic stylization.

The reason for this is because the Layer Definition XML schema does not define a justification setting for the TextSymbol element (which controls feature label settings). The rendering/stylization engine itself allows for this justification to be changed (so there is no work required on this front), but there is nothing on the Layer Definition XML to change this justification value from its "Left" default.

Proposed Solution

Update our v4.0.0 LayerDefinition XML schema to introduce a new optional LabelJustification element.

` <xs:element name="LabelJustification" type="xs:string" default="'Left'" minOccurs="0">

<xs:annotation>

<xs:documentation>A string FDO expression for the label justification. Must evaluate to one of the 'Left', 'Right', 'Center' or 'Justify' (which is the same as 'Left').</xs:documentation>

</xs:annotation>

</xs:element> `

This element accepts any of the following values, which will result in the following effect (using Sheboygan Voting Districts with multi-line label as an example)

Left or Justify

Center

As the v4.0.0 Layer Definition schema has not yet been finalized as MapGuide Open Source 4.0 is still in development, we'll take this opportunity to fix up an oversight in MapGuideRfc178.

The new IncludeFeatureBounds element introduced with this RFC was made a required element by mistake. For this RFC, we'll fix this element to be optional.

Test Plan

Add new rendering service tests to exercise the new justification setting

Funding / Resources

Community

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.