GEOLYTIX / xyz

An open source javascript framework for spatial data and application interfaces.
MIT License
86 stars 25 forks source link

Allow for fields in categorized theme. #1320

Closed dbauszus-glx closed 2 weeks ago

dbauszus-glx commented 2 weeks ago

It should be possible to apply a categorized theme on multiple fields.

This currently works only for icons.

The styleParser checks that the categories have a field included in the fields array.

The cat style must be an icon which is not an array. It's possible to alter this requirement later but I would need a valid test case for this.

The styleParser icon check was expanded to not merge into icons which have a type or are svg to prevent type:dot icons being merged into type:template or svg icons which would break the icon.

The cat.field is assigned as field instead of the theme.field in the categorized legend iteration of the categories.

dbauszus-glx commented 2 weeks ago

I'll now flatten style.icon with icons array.

image

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud