obsidian-map-view icon indicating copy to clipboard operation
obsidian-map-view copied to clipboard

Feature request: Custom pin colors

Open cakechaser opened this issue 2 years ago • 4 comments

First of all thanks for the plugin, really amazing work!

My request is to add custom color codes (based on hex/rgb), since the default list of colors doesn't cover my use-case.

In my workflow I'd like to have a list of places for each category (e.g. food), and mark them with a tag #visited or #notvisited, to see at a glance which I still plan to visit. The way I want to differentiate is to have slightly lighter/darker tones of the same color.

So for example the map would have:

  • Food places - marked with light/dark green
  • Museums - marked with light/dark red
  • Clothes stores - marked with light/dark blue

I know that there are already some shades of colors available, like "green", "green-dark", and "green-light", but for me they are not visually distinct enough from each other, and can blend-in together.

Thank you!

cakechaser avatar Aug 05 '23 08:08 cakechaser

The need is very viable, I'll see what I can do.

esm7 avatar Aug 07 '23 05:08 esm7

If I recall, this actually used to work with SVG pins enabled (requires editing some JSON), but has unfortunately broken in one of the more recent builds (#143).

@esm7, do you know if the base marker colours (without SVG enabled) are bound by what Leaflet.ExtraMarkers supports by default?

huy-vuong avatar Oct 05 '23 08:10 huy-vuong

Hi, sorry for the late reply. You are completely correct in pointing out the problem and the related issue. Quick recap: in Map View 3.0.0 I did a major overhaul to how the plugin uses Leaflet.ExtraMarkers, overriding some of that library's code, because it proved to be extremely slow when scaled to thousands of markers like many users (including myself) have. However, this broke some of the library's features. In some cases I was able to recreate these features, but in some cases not yet. I worked on this a bit and wasn't yet able to get this to work, but I assume that a bit more persistence and I'll crack it. The real problem is that in the past 2 months I haven't been able to spend time on this project, but as soon as I will, this is one of the prioritized issues to work on.

esm7 avatar Nov 15 '23 14:11 esm7