From 80fba7a292be838255f7f0e9f75ed2987544f96e Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Fri, 9 Dec 2022 08:11:14 +0000 Subject: [PATCH] Fit the world to the map on startup --- plugins/tiddlywiki/geospatial/widgets/geomap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/tiddlywiki/geospatial/widgets/geomap.js b/plugins/tiddlywiki/geospatial/widgets/geomap.js index 8eda39da8..679f4dded 100644 --- a/plugins/tiddlywiki/geospatial/widgets/geomap.js +++ b/plugins/tiddlywiki/geospatial/widgets/geomap.js @@ -50,6 +50,7 @@ GeomapWidget.prototype.renderMap = function(domNode) { var L = require("$:/plugins/tiddlywiki/geospatial/leaflet.js"); // Create and position the map const map = L.map(domNode).setView([51.505, -0.09], 13); + map.fitWorld(); // Setup the tile layer const tiles = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19,