Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do I load an icon? #490

Closed
4 tasks done
ralyodio opened this issue Apr 26, 2024 · 2 comments
Closed
4 tasks done

how do I load an icon? #490

ralyodio opened this issue Apr 26, 2024 · 2 comments

Comments

@ralyodio
Copy link

Describe the bug

Trying to load a marker.svg icon on a map in svelte.

How do do this? Where do I put the file and how do I reference it in the html?

Electron-Vite Version

2.0.0

Electron Version

28.2.0

Vite Version

5.0.12

Validations

@ralyodio
Copy link
Author

 placemarkAttributes.imageSource = '../../resources/satellite.svg?asset'
    const satellitePlacemark = new WorldWind.Placemark(satellitePosition, true, placemarkAttributes)
    placemarkLayer.addRenderable(satellitePlacemark)
    wwd.redraw()

this path isn't reliable. it doesn't work in dev mode but does work in start mode, but not in build:* modes in npm scripts.

@alex8088
Copy link
Owner

 placemarkAttributes.imageSource = '../../resources/satellite.svg?asset'
    const satellitePlacemark = new WorldWind.Placemark(satellitePosition, true, placemarkAttributes)
    placemarkLayer.addRenderable(satellitePlacemark)
    wwd.redraw()

this path isn't reliable. it doesn't work in dev mode but does work in start mode, but not in build:* modes in npm scripts.

@alex8088 alex8088 closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants