Open cascafico opened 8 years ago
Have you tried to change the popup template?
I was trying to pass "\n" from an imported csv. Now I imported data as geojson and it is correctly interpreted in popoup [1].
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "HANDICAPS": "auditif\nmental" }, "geometry": { "type": "Point", "coordinates": [ 5.535133, 45.90137 ] } }
]
}
What still happens is that once I display table, "\n" is gone (ie: I read "auditifmental"), but newline is still interpreted in popup.
It works if the CSV field contains actual line breaks (not "\n") and is enclosed in double quotation marks:
HANDICAPS,lon,lat
"auditif
mental",10.0,51.0
uMap uses csv2geojson, that again uses d3-dsv, that implements RFC 4180 (Common Format and MIME Type for CSV Files). It defines:
6. Fields containing line breaks (CRLF), double quotes, and commas
should be enclosed in double-quotes. For example:
"aaa","b CRLF
bb","ccc" CRLF
zzz,yyy,xxx
Bonjour,
How can I include newlines?
Example, not working:
{name} contains "amenity=bar\nrestaurant=yes"
I'd like popup like this:
amenity=bar restaurant=yes