xyz icon indicating copy to clipboard operation
xyz copied to clipboard

icon styles: svgSymbols / svg_templates

Open dbauszus-glx opened this issue 11 months ago • 2 comments

The svgSymbols mapp mod has become quite a long in the teeth.

The type icons should be retired once the styleParser has been reviewed and merged.

There are currently following type symbols.

dot target triangle square diamond semiCircle markerLetter markerColor circle template

SVG icons hosted in the public directory should be made available for these.

The styleParser method can replace the type declarations with the matching svg.

It must still be possible to create an icon from a custom function. Memoization is crucial is this is to happen inside the theme method.

The template type icons should be created with the styleParser.

dbauszus-glx avatar Mar 21 '24 19:03 dbauszus-glx

The svg_templates plugin method shouldn't be a plugin method. This method should always be executed when a mapview is created. But svg_templates should not be loaded twice in the case of multiple mapviews in a document.

With the svgSymbols being retired it doesn't make sense to have the type: template if there is only a single type.

It must still be possible to create a custom templates from a function.

There should be an interface to define custom templates and colour substitutes.

The templates should render without any colours being substituted.

dbauszus-glx avatar May 03 '24 12:05 dbauszus-glx

The next step will be to create svg templates for each type.

These default templates could be imported as string from svg files in the public folder if possible.

The target: type needs to be translated into base icon dot (with shadow) and additional icon array items which do not have a shadow.

A translation method will be required for each of the type icons.

It may be necessary to flatten icon arrays where an array type target is in an icon array.

dbauszus-glx avatar Jun 21 '24 14:06 dbauszus-glx