Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
aengus1 opened this Issue · 4 comments

4 participants

Aengus Dane Springmeyer Cartifact Hermann Kraus
Aengus

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>
Dane Springmeyer
Owner

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

Aengus

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

Hermann Kraus herm was assigned
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

Hermann Kraus
Collaborator

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

Hermann Kraus herm closed this
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.