Merge areaSymbol and symbol, areaText and Text (patch included) #1446
Comments
Author: R2D2_C3PO updated to work with xslt |
Author: bob[at]cakebox.net Just a small thing: If there should be one instruction to draw text for points and areas I'd rather call it something like pointText instead of areaText. Or maybe the text instruction should be renamed pathText and the other one could be text, that would probably be the most logical, although it would require changes to all osmarender stylesheets simultaneously, which we shouldn't count on being possible. |
Author: bob[at]cakebox.net Replying to [comment:2 bob[at]cakebox.net]:
One way to change these without breaking backwards compatibility would be to call the methods pointText and pathText, add a wrapper called text that calls pathText and one called areaText that calls pointText. That way old stylesheets keep working, and the proper function names get suitable names that better explain what they do. |
Author: R2D2_C3PO Replying to [comment:3 bob[at]cakebox.net]:
Calling it point text is as bad as calling it areaText, as it works on both points and areas. Here's summary what works where: Before:[[BR]] After:[[BR]] So it would be best to rename text'' to ''pathText'' (because it's no longer needed for nodes) and rename ''areaText'' to ''text. However this will lead to confusion and all styles have to be updated at the same time. |
Author: bob[at]cakebox.net Replying to [comment:4 R2D2_C3PO]:
No, because areaText just computes a point and puts text there, so it's not too wrong to call that pointText. |
Author: R2D2_C3PO How about this: areaText'' is called ''label because you usually use it to put a label somewhere. And we keep the old name as an alias for some time to maintain compatibility? |
Author: R2D2_C3PO Added a patch that uses pathText' and 'caption (because most styles are already named caption-...). |
Author: osm[at]petschge.de I'll apply this patch this weekend. If you could regenerate the patch against the current state in svn I would be glad, otherwise I'll have to handle the conflicts myself. |
Author: osm[at]petschge.de The changes to the code and the changes to the z17 stylesheet are in along with some whitespace cleanup. Further cleanups of the stylesheets are of course welcome. |
Author: R2D2_C3PO You missed an important part of my patch. The drawCircle function in XSLT needs 2 more parameters now, as otherwise the output will be like this: |
Author: R2D2_C3PO There are also a few errors in the stylesheet: amenity=parking was present twice. Patch is attached. And some things I'm unsure about: Is it really intended, that for historic=museum an icon is displayed when it is a node but only an area without an icon is displayed when it is an area? (lines 2486-2496) I think all place names should be rendered the same no matter if it is a node or a way (line 2860ff.) I'll add an patch with these changes later and you can decide if you want to apply it. |
Author: osm[at]petschge.de Ups. Sorry. The problem was that there were conflicts all over the place and I had to apply the patch by hand. I guess I missed the change to the circles. Now I applied circle.diff and everything sould be fine again. I also applied z17-extended.diff and z12-16.diff. |
Reporter: R2D2_C3PO
[Submitted to the original trac issue database at 7.45pm, Wednesday, 7th January 2009]
Osmarender currently has a lot of dupplicate rules, because one is needed for nodes and one for ways. This patch changes the or/p behaviour:
works for both ways and nodes.
is no longer needed but kept for compatibility with old stylefiles.
keeps its old meaning (labeling streets, etc).
now works on nodes too.
works on both nodes and ways.
A bug in orp-select.pm is fixed, so it does not fail on e="node|way".
The current z17 stylesheet is converted to the new syntax. Also some improvements in rendering are done as a result (same rendering of amenity=theatre for ways and nodes).
xslt still needs changes.
The text was updated successfully, but these errors were encountered: