On 02/03/2014 01:35 PM, Martin Vonwald wrote:
Hi!
Is there any known way in a MapCSS style to either escape special
characters (regarding SVG) or replace some characters within a text?
I want to build an embedded svg containing text from a tag. I need to
escape special characters from the text, otherwise the text will no display
correctly.
There is a replace function [1]. I'm guessing you want to use SVG as
data url, so need to URL-encode the SVG source? It shouldn't be too
difficult to provide a function for that (we can use
java.net.URLEncoder). Please open a ticket if it is needed.
[1]
<http://josm.openstreetmap.de/doc/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.Functions.html#replace(java.lang.String,
java.lang.String, java.lang.String)>
Paul
_______________________________________________
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev