ShieldSymbolizer dx / dy moves image as well as text #1148

Closed
aengus1 opened this Issue Mar 26, 2012 · 4 comments

Projects

None yet

4 participants

@aengus1

I have recently upgraded my Mapnik version to 2.1.0_rc1 using the installer available at https://github.com/downloads/mapnik/mapnik/mapnik_2.1.0-rc1.dmg.

I have found some odd behaviour regarding the shieldSymbolizer. dx and dy values appear to shift the entire shield by the specified number of pixels, rather than only the text, as specified in the docs.

Below is an example of the rule I am using:

   <Rule>
        <ShieldSymbolizer size="10" fill="#000" dx="-1" dy="-1" placement="point" file="shield.png" minimum-distance="40" fontset-name="book-fonts" halo-radius="1">[ref]</ShieldSymbolizer>
    </Rule>
@springmeyer
Mapnik member

What happens if you use shield-dx and/or shield-dy?

@aengus1

shield-dx and shield-dy behave as expected, i.e. they also shift the image and the text.

@herm herm was assigned Apr 1, 2012
@cartifact

You may have to set unlock-image="true" (I believe it's incorrectly listed in the shieldsymbolizer as "unlock-imageplacements").

If "false", the symbol is placed relative to the text box center.
If "true", the symbol is placed relative to the point position

@herm
Mapnik member

Should work correctly in current master. However for a better interface was defined for new versions. https://github.com/mapnik/mapnik/wiki/ShieldSymbolizer

@herm herm closed this Aug 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment