polylines tooltip content
This commit is contained in:
23
__mocks__/leaflet.js
Normal file
23
__mocks__/leaflet.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// __mocks__/leaflet.js
|
||||
const L = {
|
||||
divIcon: jest.fn(() => new L.DivIcon()),
|
||||
DivIcon: function () {
|
||||
this.options = {
|
||||
className: "custom-start-icon",
|
||||
html: `
|
||||
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<polygon points="10,2 18,18 2,18" fill="black" />
|
||||
<polygon points="10,5 16,16 4,16" fill="gray" />
|
||||
</svg>
|
||||
`,
|
||||
iconSize: [18, 18],
|
||||
iconAnchor: [9, 10],
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
L.DivIcon.prototype = {
|
||||
constructor: L.DivIcon,
|
||||
};
|
||||
|
||||
module.exports = L;
|
||||
Reference in New Issue
Block a user