icon styles: svgSymbols / svg_templates #2164
Replies: 3 comments
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
The aim of this discussion is to provide a definition of an icon style object. Backwards compatibility must be achievable through the styleParser. The svgSymbols is only internally referenced and can be changed. Icon generation must synchronous for OL styling. Any resources which must be fetched need to be defined in the locale and be fetched before any layers are styled. It should be possible to replace any matched string in a svg cached as string. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions