How to put a svg marker on the canvas layer in leaflet?

Hello.
Prompt, please, who knows.
Is there an affordable way (using plugins simple code or clever use of already available functionality) to place a svg marker on the canvas layer? Like circleMarker, only arbitrary svg marker of fixed size.
Thank you.
March 19th 20 at 08:36
2 answers
March 19th 20 at 08:38
In docks all is. In Google everything is there. On stackoverflow there are all.

https://leafletjs.com/examples/custom-icons/

var svg = " // insert your own svg
var iconUrl = 'data:image/svg+xml;base64,' + btoa(svg);

var icon = L. icon( {
 iconUrl: iconUrl,
} );
Will layer with multiple img elements, not a single canvas layer. From what you suggest, I just want to move out, because it is not acceptable when a large number of markers. - Jamel commented on March 19th 20 at 08:41
@Jamel, are you trying to embed a foreign object. Markers, circles, polygons, all separate objects that sit on top of the canvas, look in the inspector. - kelli commented on March 19th 20 at 08:44
@kelli, look at the html that creates leaflet. Namely .leaflet-pane. Markers as img, see .leaflet-marker-pane, and circleMarker - on .leaflet-overlay-pane>canvas, within a single picture, there will be a polyline, polygone, etc. of Course, as the renderer is taken L. Canvas.
So
In docks all is. In Google everything is there. On stackoverflow there are all.
- it was unnecessary - Jamel commented on March 19th 20 at 08:47
March 19th 20 at 08:40
You can use this plugin https://www.npmjs.com/package/leaflet-canvas-markers
It allows you to simply add any image on a single Canvas layer which is added and circleMarker

Find more questions by tags SVGLeafletCanvas