mapfish-print
mapfish-print copied to clipboard
Is it possible to set the graphicYOffset?
Dear guys,
is it possible to set the graphicYOffset? Pixel offset along the positive y axis for displacing an external graphic. I did not find this attribute in the current documentation. See: http://mapfish.github.io/mapfish-print-doc/#/styles#mapfishJsonParser
Is there another way to change the offset?
Kind regards
At the moment it appears this is not supported.
Could it be that there is no graphicXOffset/graphicYOffset
in SLD (what mfp3 is using for the styling)?
For labels there is AnchorPoint but for symbols it seems you have to directly transform the point geometry (see http://gis.stackexchange.com/questions/21495/offset-to-symbol-in-wms-request). Could this be or am I missing something?
That is for labels. In SLD there is an option for external graphic's but we don't yet support that in the JSON style parser. It is a fairly minor change to implement.
Jesse
On Wed, Apr 29, 2015 at 9:29 AM, Tobias Sauerwein [email protected] wrote:
Could it be that there is no graphicXOffset/graphicYOffset in SLD (what mfp3 is using for the styling)?
For labels there is AnchorPoint http://docs.geoserver.org/latest/en/user/styling/sld-reference/textsymbolizer.html#pointplacement but for symbols it seems you have to directly transform the point geometry (see http://gis.stackexchange.com/questions/21495/offset-to-symbol-in-wms-request). Could this be or am I missing something?
— Reply to this email directly or view it on GitHub https://github.com/mapfish/mapfish-print/issues/237#issuecomment-97331483 .
What's that option? Because I couldn't find it in the docs.
For SLD:
http://docs.geoserver.org/2.6.x/en/user/styling/sld-extensions/pointsymbols.html#symbol-positioning
The odd thing is that in the actual spec and code I can't really see how to do that positioning. In fact if I look at http://osgeo-org.1560.x6.nabble.com/SLD-and-external-graphic-offset-td3802684.html it implies this functionality isn't possible for ExternalGraphic.
However in SLD the geometry is an expression, functions could be used to translate the geometry to a new location (essentially implementing offset). That could be used to implement this option.
I guess the question this brings up to me is, should we add offset or add geometry transform option instead (more complicated but more powerful).
Perhaps both. offset to make it simple for users and transform for more powerful operations.
(Just thinking now.)
Jesse
On Wed, Apr 29, 2015 at 5:53 PM, Tobias Sauerwein [email protected] wrote:
What's that option? Because I couldn't find it in the docs.
— Reply to this email directly or view it on GitHub https://github.com/mapfish/mapfish-print/issues/237#issuecomment-97478344 .
Perhaps both. offset to make it simple for users and transform for more powerful operations.
Sounds reasonable!
Hi all, I went to the same situation. I tried a small modication in the json style parser by setting a Displacement on the graphic. I also try an anchorPoint (but that's for labels). Both solutions didn't work. I guess the simplest way is to change the geometry of markers. That's what the geotools doc says about point positioning: http://docs.geoserver.org/stable/en/user/styling/sld-extensions/pointsymbols.html
Ganaël