1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-06 20:14:22 +00:00

Fit the world to the map on startup

This commit is contained in:
jeremy@jermolene.com 2022-12-09 08:11:14 +00:00
parent cff3473fa6
commit 80fba7a292

View File

@ -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,