mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 20:02:36 +02:00
Merge pull request #1920 from umap-project/fix-overlay-null
chore: do not set overlay=null as default
This commit is contained in:
commit
73493258f1
1 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
L.Map.mergeOptions({
|
L.Map.mergeOptions({
|
||||||
overlay: null,
|
overlay: {},
|
||||||
datalayers: [],
|
datalayers: [],
|
||||||
hash: true,
|
hash: true,
|
||||||
maxZoomLimit: 24,
|
maxZoomLimit: 24,
|
||||||
|
@ -205,12 +205,6 @@ U.Map = L.Map.extend({
|
||||||
this.editTools = new U.Editable(this)
|
this.editTools = new U.Editable(this)
|
||||||
this.renderEditToolbar()
|
this.renderEditToolbar()
|
||||||
}
|
}
|
||||||
if (!U.Utils.isObject(this.options.overlay)) {
|
|
||||||
this.options.overlay = {}
|
|
||||||
}
|
|
||||||
if (!U.Utils.isObject(this.options.tilelayer)) {
|
|
||||||
this.options.tilelayer = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.initShortcuts()
|
this.initShortcuts()
|
||||||
this.onceDataLoaded(function () {
|
this.onceDataLoaded(function () {
|
||||||
|
@ -1296,6 +1290,9 @@ U.Map = L.Map.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
_editTilelayer: function (container) {
|
_editTilelayer: function (container) {
|
||||||
|
if (!U.Utils.isObject(this.options.tilelayer)) {
|
||||||
|
this.options.tilelayer = {}
|
||||||
|
}
|
||||||
const tilelayerFields = [
|
const tilelayerFields = [
|
||||||
[
|
[
|
||||||
'options.tilelayer.name',
|
'options.tilelayer.name',
|
||||||
|
@ -1343,6 +1340,9 @@ U.Map = L.Map.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
_editOverlay: function (container) {
|
_editOverlay: function (container) {
|
||||||
|
if (!U.Utils.isObject(this.options.overlay)) {
|
||||||
|
this.options.overlay = {}
|
||||||
|
}
|
||||||
const overlayFields = [
|
const overlayFields = [
|
||||||
[
|
[
|
||||||
'options.overlay.url_template',
|
'options.overlay.url_template',
|
||||||
|
|
Loading…
Reference in a new issue