1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +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 5dcc2ed834
commit 7e0ddd03a5

View File

@ -50,6 +50,7 @@ GeomapWidget.prototype.renderMap = function(domNode) {
var L = require("$:/plugins/tiddlywiki/geospatial/leaflet.js"); var L = require("$:/plugins/tiddlywiki/geospatial/leaflet.js");
// Create and position the map // Create and position the map
const map = L.map(domNode).setView([51.505, -0.09], 13); const map = L.map(domNode).setView([51.505, -0.09], 13);
map.fitWorld();
// Setup the tile layer // Setup the tile layer
const tiles = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { const tiles = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19, maxZoom: 19,