mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 09:30:28 +00:00
Fit the world to the map on startup
This commit is contained in:
parent
5dcc2ed834
commit
7e0ddd03a5
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user