Icon marker doesn't appear
See original GitHub issueProblem appears on development build. I was trying to reproduce example with geolocation locally, but marker icon doesn’t appear.
I found problem with generating icon path.
These paths doesn’t work:
./assets/marker.png
[like in official VueLayers demo]
_media/marker.png
[like in VueLayers documentation]
Icon only appears if I add img tag with path ./assets/marker.png
somewhere outside vl-map,
copy its generated path and paste to vl-style-icon as absolute path http://localhost:8080/img/flag.b9225040.png
Official VueLayers demo on website and example in documentation works without problem. Please help.
Vuelayers v0.10.13 Vue v3.0.4 Yarn v1.9.4 Node v10.10.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
google map marker icon not showing [closed] - Stack Overflow
The only problem is that the map marker is not showing up. I have the following script. It seems that the icon var...
Read more >Map <Marker> image does not appear on Next.js #808 - GitHub
When I import my leaflet map in react with dynamic import (required with Next.js), I want the marker images to be display. Actual...
Read more >Markers not showing in leaflet map - RStudio Community
Hi I have just started to use leaflet and am experiencing issues showing markers on a basic map. The network tab in my...
Read more >Markers | Maps JavaScript API - Google Developers
Markers can display custom images, in which case they are usually referred to as "icons." Markers and icons are objects of type Marker...
Read more >Markers Are Not Showing on My Map on the Front-end
Please ensure that you are using the latest versions of all WP Go Maps plugins. To check to see whether you need to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s good! 👍
vl-style-icon
that is used for marker styling is the custom VueLayers component. vue-loader doesn’t know anything about it until you explicitly provide him with additional tags and attributes. Take look here https://vue-loader.vuejs.org/options.html#transformasseturls.Try to setup vue-loader options like in my previous comment.
In the demo I also use
transformAssetUrls
.