@sigma/layer-maplibre 3.0.0-beta.7 → 3.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -142,9 +142,14 @@ function bindMaplibreLayer(sigma, opts) {
142
142
  var prevSigmaSettings = sigma.getSettings();
143
143
 
144
144
  // Creating map container
145
- var mapContainer = document.createElement("div");
146
- mapContainer.classList.add("sigma-layer-maplibre");
147
- mapContainer.setAttribute("style", "position: absolute; inset: 0");
145
+ var mapContainer = sigma.createLayer("layer-leaflet", "div", {
146
+ style: {
147
+ position: "absolute",
148
+ inset: "0"
149
+ },
150
+ // 'edges' is the first sigma layer
151
+ beforeLayer: "edges"
152
+ });
148
153
  sigma.getContainer().prepend(mapContainer);
149
154
 
150
155
  // Initialize the map
@@ -142,9 +142,14 @@ function bindMaplibreLayer(sigma, opts) {
142
142
  var prevSigmaSettings = sigma.getSettings();
143
143
 
144
144
  // Creating map container
145
- var mapContainer = document.createElement("div");
146
- mapContainer.classList.add("sigma-layer-maplibre");
147
- mapContainer.setAttribute("style", "position: absolute; inset: 0");
145
+ var mapContainer = sigma.createLayer("layer-leaflet", "div", {
146
+ style: {
147
+ position: "absolute",
148
+ inset: "0"
149
+ },
150
+ // 'edges' is the first sigma layer
151
+ beforeLayer: "edges"
152
+ });
148
153
  sigma.getContainer().prepend(mapContainer);
149
154
 
150
155
  // Initialize the map
@@ -138,9 +138,14 @@ function bindMaplibreLayer(sigma, opts) {
138
138
  var prevSigmaSettings = sigma.getSettings();
139
139
 
140
140
  // Creating map container
141
- var mapContainer = document.createElement("div");
142
- mapContainer.classList.add("sigma-layer-maplibre");
143
- mapContainer.setAttribute("style", "position: absolute; inset: 0");
141
+ var mapContainer = sigma.createLayer("layer-leaflet", "div", {
142
+ style: {
143
+ position: "absolute",
144
+ inset: "0"
145
+ },
146
+ // 'edges' is the first sigma layer
147
+ beforeLayer: "edges"
148
+ });
144
149
  sigma.getContainer().prepend(mapContainer);
145
150
 
146
151
  // Initialize the map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigma/layer-maplibre",
3
- "version": "3.0.0-beta.7",
3
+ "version": "3.0.0-beta.8",
4
4
  "description": "A plugin to set a geographical map in background",
5
5
  "main": "dist/sigma-layer-maplibre.cjs.js",
6
6
  "module": "dist/sigma-layer-maplibre.esm.js",
@@ -45,5 +45,5 @@
45
45
  },
46
46
  "./package.json": "./package.json"
47
47
  },
48
- "gitHead": "126195956b46275ff4b0d5dedd380aa17ab3c9e2"
48
+ "gitHead": "8edd2ee8dad222bac99439feed321d55896bb61e"
49
49
  }