question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toolbar icon not loaded when using npm

See original GitHub issue

It seems that the path used in the css to set the background-image for the toolbar icons is incorrect. In fact, it searches for a file situated at ${myCurrentURL}/images/spritesheet.svg instead of looking for the file in the node module.

Is there something special to do while “requiring” the package?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:3
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
wishinghandcommented, Feb 5, 2019

Sorry to reawaken this, but I think it may still be relevant. I’m running into the same issue with:

Leaflet.draw 1.0.4 Leaflet: 1.3.1 Vue: 2.5.22

I import like so in Vue: import LeafletDraw from 'leaflet-draw' and then I also copied both PNG spritesheets and the SVG one to my project’s images folder. The controls show up after I attach the layers to the Leaflet map instance I have. No errors, but also no icons in the controls.

My controls look like the ones pictured here: https://stackoverflow.com/questions/43638679/leaflet-draw-controls-toolbar-not-displaying

1reaction
raulfbcommented, Apr 26, 2022

If you are using vue.js: import ‘leaflet-draw/dist/leaflet.draw.css’

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to add taskbar icon to node webkit application
I have created React application and bundled it using nw-react-scripts . I am trying to add icon for taskbar, but icon doesn't change....
Read more >
@material/toolbar - npm
MDC Toolbar acts as a container for multiple rows containing items such as application title, navigation menu, and tabs, among other things.
Read more >
vue-file-toolbar-menu - npm
Start using vue-file-toolbar-menu in your project by running `npm i vue-file-toolbar-menu`. There are no other projects in the npm registry ...
Read more >
@material/mwc-icon - npm
This loads the Material Icons font, which is required to render icons, and is not loaded automatically. If you see plain text instead...
Read more >
@expo/vector-icons - npm
Run git status and look at the untracked files. Remove anything that doesn't seem needed. For example, remove package.json, react-native.config.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found