Skip to content

Conversation

@mikefowler
Copy link

@mikefowler mikefowler commented Jan 6, 2026

Overview

Adds a new configuration option to the plugin which allows a user to select the zoom "strategy". This change supports three strategies:

  • Default: Zoom is set by the "Default zoom" configuration
  • Bounds: Zoom is determined by the bounds of all markers
  • Properties: Zoom is set to the widest (lowest number) zoom defined in the markers/notes, according to the property selected in the "Zoom property" configuration

Partially addresses: #12

@kepano or others, let me know what you think. Happy to iterate on this. At the moment I don't think the functionality is fully backwards-compatible, compared with the current behavior, but ideally it would be so.

Use-case

Primarily, embedding a Base inside a note that will display the coordinates and zoom level defined by that note.

For example, the following note uses an inline Base to render a map of San Francisco, with the zoom level set to 14.

---
title: San Francisco
categories:
  - "[[Places]]"
created: 2026-01-06
updated: 2026-01-06
coordinates:
  - "37.779379"
  - "-122.418433"
zoom: 14
---

```base
filters:
  and:
    - categories.containsAny(link("Places"))
    - file == this.file
views:
  - type: map
    name: Single Place
    coordinates: note.coordinates
    zoom: note.zoom
    zoomStrategy: properties
```

Screenshots

Screenshot 2026-01-06 at 2 55 52 PM

Adds a new configuration option to the plugin which allows a user to
select the zoom "strategy". This change supports three strategies:

- Default: Zoom is set by the "Default zoom" configuration
- Bounds: Zoom is determined by the bounds of all markers
- Properties: Zoom is set to the widest (lowest number) zoom defined in
  the markers/notes, according to the property selected in the "Zoom
  property" configuration
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

Successfully merging this pull request may close these issues.

1 participant