@maplibre-yaml/core 0.2.1 → 0.2.2
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.
- package/dist/components/index.js +7 -7
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/register.browser.js +7 -7
- package/dist/register.browser.js.map +1 -1
- package/dist/register.js +7 -7
- package/dist/register.js.map +1 -1
- package/package.json +1 -1
package/dist/register.browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import maplibregl2 from 'maplibre-gl';
|
|
2
2
|
|
|
3
3
|
// @maplibre-yaml/core - Browser build with bundled dependencies
|
|
4
4
|
var __create = Object.create;
|
|
@@ -15337,7 +15337,7 @@ var EventHandler = class {
|
|
|
15337
15337
|
showPopup(content, feature, lngLat) {
|
|
15338
15338
|
this.activePopup?.remove();
|
|
15339
15339
|
const html = this.popupBuilder.build(content, feature.properties);
|
|
15340
|
-
this.activePopup = new Popup().setLngLat(lngLat).setHTML(html).addTo(this.map);
|
|
15340
|
+
this.activePopup = new maplibregl2.Popup().setLngLat(lngLat).setHTML(html).addTo(this.map);
|
|
15341
15341
|
}
|
|
15342
15342
|
/**
|
|
15343
15343
|
* Detach events for a layer
|
|
@@ -15442,14 +15442,14 @@ var ControlsManager = class {
|
|
|
15442
15442
|
if (config.navigation) {
|
|
15443
15443
|
const options = typeof config.navigation === "object" ? config.navigation : {};
|
|
15444
15444
|
const position = options.position || "top-right";
|
|
15445
|
-
const control = new NavigationControl();
|
|
15445
|
+
const control = new maplibregl2.NavigationControl();
|
|
15446
15446
|
this.map.addControl(control, position);
|
|
15447
15447
|
this.addedControls.push(control);
|
|
15448
15448
|
}
|
|
15449
15449
|
if (config.geolocate) {
|
|
15450
15450
|
const options = typeof config.geolocate === "object" ? config.geolocate : {};
|
|
15451
15451
|
const position = options.position || "top-right";
|
|
15452
|
-
const control = new GeolocateControl({
|
|
15452
|
+
const control = new maplibregl2.GeolocateControl({
|
|
15453
15453
|
positionOptions: { enableHighAccuracy: true },
|
|
15454
15454
|
trackUserLocation: true
|
|
15455
15455
|
});
|
|
@@ -15459,14 +15459,14 @@ var ControlsManager = class {
|
|
|
15459
15459
|
if (config.scale) {
|
|
15460
15460
|
const options = typeof config.scale === "object" ? config.scale : {};
|
|
15461
15461
|
const position = options.position || "bottom-left";
|
|
15462
|
-
const control = new ScaleControl();
|
|
15462
|
+
const control = new maplibregl2.ScaleControl();
|
|
15463
15463
|
this.map.addControl(control, position);
|
|
15464
15464
|
this.addedControls.push(control);
|
|
15465
15465
|
}
|
|
15466
15466
|
if (config.fullscreen) {
|
|
15467
15467
|
const options = typeof config.fullscreen === "object" ? config.fullscreen : {};
|
|
15468
15468
|
const position = options.position || "top-right";
|
|
15469
|
-
const control = new FullscreenControl();
|
|
15469
|
+
const control = new maplibregl2.FullscreenControl();
|
|
15470
15470
|
this.map.addControl(control, position);
|
|
15471
15471
|
this.addedControls.push(control);
|
|
15472
15472
|
}
|
|
@@ -15494,7 +15494,7 @@ var MapRenderer = class {
|
|
|
15494
15494
|
constructor(container, config, layers = [], options = {}, sources) {
|
|
15495
15495
|
this.eventListeners = /* @__PURE__ */ new Map();
|
|
15496
15496
|
this.isLoaded = false;
|
|
15497
|
-
this.map = new Map
|
|
15497
|
+
this.map = new maplibregl2.Map({
|
|
15498
15498
|
...config,
|
|
15499
15499
|
container: typeof container === "string" ? container : container,
|
|
15500
15500
|
style: config.mapStyle,
|