esm7 / obsidian-map-view

Interactive map view for Obsidian.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use a custom image as a marker icon

lucabello opened this issue · comments

Hi! First, thanks for the great plugin, I've been using it a lot and I love it :)

What I'm trying to achieve

I'm building a world map, and I'm trying to display a marker on some countries (with some note related to each). I'd love to display the country flag on each marker (such as hampusborgos/country-flags or hatscripts/circle-flags, instead of a FA icon; however, that doesn't seem to be possible.
To summarize, I'm looking for a way to use a custom img/svg instead of a FA icon :)

What I've tried

Your documentation mentions that in the advanced markers configurations you can make use of the ExtraMarkers properties; specifically, I tried using innerHTML, but that didn't work. In this repo's issues I found one where you mentioned that you cut on that functionality for performance issues (which you also mention in the code).

Possible solutions

If performance issues are a problem, I'd be perfectly happy to link local images as well; arguably, since properties like innerHTML are not surfaced through the UI (but only allowed through advanced configuration), a note in the docs like beware of performance issues if you use this could be enough :)

Let me know what you think!