mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-06 19:20:48 +00:00
Fit the world to the map on startup
This commit is contained in:
parent
cff3473fa6
commit
80fba7a292
|
@ -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