cubicweb-leaflet #5337986 Use json data for markers instead of strings in GeoJSON views. [rejected]

Currently, when a result set is passed to the build_markers method of a GeoJSON view, this method returns a string.

For example, if a result set contains the following two lines:

'{"type": "Feature"}'
'{"type": "Point"}'

the build_markers method will return the string:

'[{"type": "Feature"}, {"type": "Point"}]'

Instead, it should return a list:

[{"type": "Feature"}, {"type": "Point"}]

The reason for this is that all double-quotes (") will be escaped in the string when passed to Leaflet and it won't be able to parse it.

In the given example, the following string will be passed to Leaflet if markers are strings:

'[{\"type\": \"Feature\"}, {\"type\": \"Point\"}]'

And this is invalid.

On the other hand, if markers are json data, a valid string will be passed to Leaflet:

'[{"type": "Feature"}, {"type": "Point"}]'
done in0.4.0
load left0.000
closed by<not specified>
patch[views] Make GeoJSON views use json data, not strings. [folded]