javalent / obsidian-leaflet

Adds interactive maps to Obsidian.md using Leaflet.js
481 stars 29 forks source link

[Feature Request] Option to center the marker icon on the marker position #353

Closed Jnosh closed 1 year ago

Jnosh commented 1 year ago

It would be convenient to be able to configure custom markers to center the marker icon on the marker location.

Currently, the marker is always positioned so that the center of the bottom edge of the icon is placed on the marker location. This is appropriate for the default icon where the "pin" is then placed on the location and for markers that use the "Layer Icon" option.

But when using markers with fully custom icons without using "Layer Icon", it would often make more sense to simply center the icon on the marker location. Particularly when setting marker locations through frontmatter where it is easier to determine and specify a center position than a bottom edge center position. Additionally, for icons that don't look like pins, this would work more as expected when zooming in or out where the marker icon remains centered on the map location even as it changes size relative to the map objects, e.g. a mug symbol on an inn or similar.

sigrunixia commented 1 year ago

@valentine195 Since V6 is all about markers, I recommend trying to include this in there if you can.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.