Bug: Embedded maps no longer appearing
When I upgraded to v4.0.0, embedded maps disappeared. There's a blank space that's persistent across restarts of Obsidian. Regular maps work fine.
I'm on Obsidian v1.3.7, macOS Ventura 13.4.1 M2.
Can you paste here the code block that has stopped working? Also, it would be helpful if you open the Obsidian Developer Console (Cmd+Shift+I in Mac I believe) and take a screenshot or copy any errors you may see there.
All of them, but they're all this format:
{"name":"Default","mapZoom":15,"centerLat":43.504322350467895,"centerLng":16.436598133295778,"chosenMapSource":0}
And from the dev console:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'replace')
at formatEmbeddedWithTemplates (plugin:obsidian-map-view:14827:24)
at MapViewPlugin.eval (plugin:obsidian-map-view:27574:35)
at Generator.next (<anonymous>)
at eval (plugin:obsidian-map-view:70:71)
at new Promise (<anonymous>)
at __awaiter (plugin:obsidian-map-view:66:12)
at eval (plugin:obsidian-map-view:27562:85)
at t.initDOM (app.js:1:1423792)
at t.toDOM (app.js:1:1420070)
at t.sync (app.js:1:389434)
plugin:obsidian-map-view:27734 Uncaught TypeError: Cannot read properties of null (reading 'close')
at window.closeMapPopup (plugin:obsidian-map-view:27734:38)
at HTMLAnchorElement.onmouseout (index.html:1:1)
2
plugin:obsidian-map-view:14827 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'replace')
at formatEmbeddedWithTemplates (plugin:obsidian-map-view:14827:24)
at MapViewPlugin.eval (plugin:obsidian-map-view:27574:35)
at Generator.next (<anonymous>)
at eval (plugin:obsidian-map-view:70:71)
at new Promise (<anonymous>)
at __awaiter (plugin:obsidian-map-view:66:12)
at eval (plugin:obsidian-map-view:27562:85)
at t.initDOM (app.js:1:1423792)
at t.toDOM (app.js:1:1420070)
at t.sync (app.js:1:389434)
DevTools failed to load source map: Could not load content for app://obsidian.md/styles.css.map: System error: net::ERR_FILE_NOT_FOUND
That's very useful, thank you. I'll post a fix ASAP.
I found that adding a "query":"", to the embedding gets it to work, but inserting from the embedded map from the command pallette does not add the query field.