Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Mapnik API documentation update #496

Closed
kocio-pl opened this issue Aug 20, 2018 · 3 comments
Closed

Mapnik API documentation update #496

kocio-pl opened this issue Aug 20, 2018 · 3 comments

Comments

@kocio-pl
Copy link

There's another Mapnik APi documentation update, see #494 (comment). Please update CartoCSS code and NPM package to make text-offset and shield-offset options available.

@nebulon42
Copy link
Collaborator

Since this is only a patch version update it is covered by the dependency expression which is ~8.9.1. So just do a npm install and you should have the newest mapnik-reference.

Side note: Please don't push out too many versions of mapnik-reference in a short time. I don't want to do a release every week just for mapnik-reference updates.

@kocio-pl
Copy link
Author

Thanks. Just to be sure - I did it in Kosmtik and with text-offset: 10; it produces something like:

<TextSymbolizer fill="#845484" fontset-name="fontset-1" grid-cell-height="1" grid-cell-width="1" halo-fill="rgba(255, 255, 255, 0.6)" halo-radius="1.5" line-spacing="-0.6" margin="7.7" offset="10" placement="grid" repeat-distance="100000" size="11" wrap-width="50"><![CDATA[[name]]]></TextSymbolizer>

Was it really supposed to convert text-offset variable name into the offset? I ask because I don't see the labels shift at the first sight and grid options were not converted.

@nebulon42
Copy link
Collaborator

Yes, as defined in e.g. https://github.com/mapnik/mapnik-reference/blob/gh-pages/3.0.20/reference.json#L2612. The css value is converted to the key of the object. The grid values stay prefixed in the definition.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants