@superrouteca/smap 1.2.5 → 1.2.6
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/CHANGELOG.md +5 -0
- package/dist/SOURCE.json +7 -7
- package/dist/smap-client.cjs +2 -2
- package/dist/smap-client.js +2 -2
- package/dist/smap-client.mjs +2 -2
- package/dist/smap.cjs +8 -5
- package/dist/smap.js +7 -4
- package/dist/smap.mjs +8 -5
- package/package.json +1 -1
- package/types/smap.d.cts +1 -1
- package/types/smap.d.mts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.6 — 2026-10-29
|
|
4
|
+
|
|
5
|
+
- `selectArea`: every layer named in `layers` is in the answer's `features`, an empty list when the shape caught
|
|
6
|
+
nothing of it (before, such a layer was missing, so `features.stops.map(…)` failed on an empty selection).
|
|
7
|
+
|
|
3
8
|
## 1.2.5 — 2026-10-29
|
|
4
9
|
|
|
5
10
|
- Canvas map (`renderer: 'canvas'`, and browsers without WebGL 2): pans smoothly on computers whose graphics are
|
package/dist/SOURCE.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sdkVersion": "1.2.
|
|
2
|
+
"sdkVersion": "1.2.6",
|
|
3
3
|
"engine": "maplibre-gl 6.16.0",
|
|
4
4
|
"files": {
|
|
5
|
-
"smap.js": "
|
|
5
|
+
"smap.js": "12037a7d4d0381d904a52b9f90286e55909dc01ea33184f0ab0774a940b2c8fe",
|
|
6
6
|
"smap.css": "9bc4b14821de97da199e6af4f18541eeaf53a2ae91e5831e7224f57fe6b77660",
|
|
7
|
-
"smap-client.js": "
|
|
7
|
+
"smap-client.js": "97b38c8725251b1552e89daf59144af0b89160574ac935424bedbe387fde3179",
|
|
8
8
|
"smap-client.d.ts": "5f0df11bf60c5a9ced34522a284de81260c27871678ab772f16da9ccf6883f58",
|
|
9
|
-
"smap.mjs": "
|
|
10
|
-
"smap.cjs": "
|
|
11
|
-
"smap-client.cjs": "
|
|
12
|
-
"smap-client.mjs": "
|
|
9
|
+
"smap.mjs": "e96a8d122b69f9b817b76fe4d9756790bec8d1ff60269ff9ba045662ce2945f2",
|
|
10
|
+
"smap.cjs": "fed668c3735beef940cedbd94ee285100ed0b9d340353a91e9e3059b9cc93e19",
|
|
11
|
+
"smap-client.cjs": "ed2b961cf1cdaf70f74011e9281146986ba898e3c3fde2ae776b441587107d2f",
|
|
12
|
+
"smap-client.mjs": "969e36da07758913d7d95e40e75f569143d20c46eda33edd18a8c44069756580",
|
|
13
13
|
"smap-client.d.cts": "e0fe4eb54cd66b831116082f42bd2f7de260f9f12a2741f4004f8cf10c252116",
|
|
14
14
|
"smap-client.d.mts": "96830d316ddb33b4ff8edb8b6f810337479636114f75c4170d95038ffda74103",
|
|
15
15
|
"vendor-licenses.txt": "ee5fc05a0677eaf69601d2c7db0d9ecd6cc27c3abc1d0733bc9ed34707cf8ef2"
|
package/dist/smap-client.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Generated by js/build.mjs from js/src (see SOURCE.json). Do not edit. */
|
|
2
|
-
/*! sMap JS client 1.2.
|
|
2
|
+
/*! sMap JS client 1.2.6 — tokens, the nearest node, styles, tiles and raw reads, without a map view. */
|
|
3
3
|
/*
|
|
4
4
|
* Runs wherever `fetch` exists: browsers, Node.js 18+, workers; elsewhere (mini programs, older runtimes) pass your
|
|
5
5
|
* own `fetch`. UMD: `window.SMapClient`, `require('smap-client')`, or an AMD module.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
}(typeof self !== 'undefined' ? self : this, function () {
|
|
20
20
|
'use strict';
|
|
21
21
|
|
|
22
|
-
var VERSION = '1.2.
|
|
22
|
+
var VERSION = '1.2.6';
|
|
23
23
|
var NODE_TTL = 3600 * 1000; // the measured order
|
|
24
24
|
var KNOWN_TTL = 30 * 86400 * 1000; // the last node list received, used when none can be read
|
|
25
25
|
|
package/dist/smap-client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sMap JS client 1.2.
|
|
1
|
+
/*! sMap JS client 1.2.6 — tokens, the nearest node, styles, tiles and raw reads, without a map view. */
|
|
2
2
|
/*
|
|
3
3
|
* Runs wherever `fetch` exists: browsers, Node.js 18+, workers; elsewhere (mini programs, older runtimes) pass your
|
|
4
4
|
* own `fetch`. UMD: `window.SMapClient`, `require('smap-client')`, or an AMD module.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}(typeof self !== 'undefined' ? self : this, function () {
|
|
19
19
|
'use strict';
|
|
20
20
|
|
|
21
|
-
var VERSION = '1.2.
|
|
21
|
+
var VERSION = '1.2.6';
|
|
22
22
|
var NODE_TTL = 3600 * 1000; // the measured order
|
|
23
23
|
var KNOWN_TTL = 30 * 86400 * 1000; // the last node list received, used when none can be read
|
|
24
24
|
|
package/dist/smap-client.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Generated by js/build.mjs from js/src (see SOURCE.json). Do not edit. */
|
|
2
2
|
var smapClientModule = { exports: {} };
|
|
3
3
|
(function (module, exports, define) {
|
|
4
|
-
/*! sMap JS client 1.2.
|
|
4
|
+
/*! sMap JS client 1.2.6 — tokens, the nearest node, styles, tiles and raw reads, without a map view. */
|
|
5
5
|
/*
|
|
6
6
|
* Runs wherever `fetch` exists: browsers, Node.js 18+, workers; elsewhere (mini programs, older runtimes) pass your
|
|
7
7
|
* own `fetch`. UMD: `window.SMapClient`, `require('smap-client')`, or an AMD module.
|
|
@@ -21,7 +21,7 @@ var smapClientModule = { exports: {} };
|
|
|
21
21
|
}(typeof self !== 'undefined' ? self : this, function () {
|
|
22
22
|
'use strict';
|
|
23
23
|
|
|
24
|
-
var VERSION = '1.2.
|
|
24
|
+
var VERSION = '1.2.6';
|
|
25
25
|
var NODE_TTL = 3600 * 1000; // the measured order
|
|
26
26
|
var KNOWN_TTL = 30 * 86400 * 1000; // the last node list received, used when none can be read
|
|
27
27
|
|
package/dist/smap.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Generated by js/build.mjs from js/src (see SOURCE.json). Do not edit. */
|
|
2
2
|
'use strict';
|
|
3
|
-
/*! sMap Web SDK 1.2.
|
|
3
|
+
/*! sMap Web SDK 1.2.6. Bundles maplibre-gl 6.16.0 (BSD-3-Clause), see vendor-licenses.txt. */
|
|
4
4
|
|
|
5
5
|
var smapCore = null;
|
|
6
6
|
function smapCreateEngine() {
|
|
@@ -31663,7 +31663,7 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
31663
31663
|
})(typeof self !== 'undefined' ? self : this, function (engine, interop, canvasLib, plan) {
|
|
31664
31664
|
'use strict';
|
|
31665
31665
|
|
|
31666
|
-
var VERSION = '1.2.
|
|
31666
|
+
var VERSION = '1.2.6';
|
|
31667
31667
|
var FLAVORS = ['light', 'white', 'grayscale', 'dark', 'black'];
|
|
31668
31668
|
var BASEMAP_SOURCE = 'basemap';
|
|
31669
31669
|
var BUILDINGS_LAYER = 'smap-buildings-3d';
|
|
@@ -34371,7 +34371,9 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
34371
34371
|
|
|
34372
34372
|
/**
|
|
34373
34373
|
* Selects features by drawing on the map: 'box' (press and drag) or 'lasso' (press and draw a free shape). Resolves
|
|
34374
|
-
* with { features: { layerId: [features] }, geometry } once the shape is drawn, or null when Escape cancels it.
|
|
34374
|
+
* with { features: { layerId: [features] }, geometry } once the shape is drawn, or null when Escape cancels it. Every
|
|
34375
|
+
* layer named in `layers` is in `features` (an empty list when nothing of it was caught); without `layers`, only the
|
|
34376
|
+
* layers something was caught in.
|
|
34375
34377
|
* A point (or custom marker) counts when it is inside; a line or area when any of its vertices is.
|
|
34376
34378
|
* @param {Object} [o] mode ('box' default, 'lasso'), layers (default every point, custom marker, line and area layer)
|
|
34377
34379
|
*/
|
|
@@ -34453,7 +34455,8 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
34453
34455
|
(function walk(c) { if (found || !c) { return; } if (typeof c[0] === 'number') { found = inside(c); } else { c.forEach(walk); } })(f.geometry && f.geometry.coordinates);
|
|
34454
34456
|
return found;
|
|
34455
34457
|
});
|
|
34456
|
-
|
|
34458
|
+
// A layer the caller named is always answered, empty when the shape caught none of it.
|
|
34459
|
+
if (hits.length || layers) { out[id] = hits; }
|
|
34457
34460
|
});
|
|
34458
34461
|
return out;
|
|
34459
34462
|
};
|
|
@@ -35846,7 +35849,7 @@ function SMapMap(options) {
|
|
|
35846
35849
|
SMapMap.prototype = core.Map.prototype;
|
|
35847
35850
|
return new core.Map(options);
|
|
35848
35851
|
}
|
|
35849
|
-
var smapVersion = "1.2.
|
|
35852
|
+
var smapVersion = "1.2.6";
|
|
35850
35853
|
var smapStyles = ['light', 'white', 'grayscale', 'dark', 'black'];
|
|
35851
35854
|
/** The bundled rendering engine, for anything the SDK does not wrap (loaded on the first call). */
|
|
35852
35855
|
function smapGetEngine() { return smapLoad().engine; }
|
package/dist/smap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sMap Web SDK 1.2.
|
|
1
|
+
/*! sMap Web SDK 1.2.6. Bundles maplibre-gl 6.16.0 (BSD-3-Clause), see vendor-licenses.txt. */
|
|
2
2
|
(function () {
|
|
3
3
|
function smapCreateEngine() {
|
|
4
4
|
var SMAP_BASE_URL = (typeof document !== 'undefined' && document.baseURI) || (typeof location !== 'undefined' && location.href) || 'about:blank';
|
|
@@ -31660,7 +31660,7 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
31660
31660
|
})(typeof self !== 'undefined' ? self : this, function (engine, interop, canvasLib, plan) {
|
|
31661
31661
|
'use strict';
|
|
31662
31662
|
|
|
31663
|
-
var VERSION = '1.2.
|
|
31663
|
+
var VERSION = '1.2.6';
|
|
31664
31664
|
var FLAVORS = ['light', 'white', 'grayscale', 'dark', 'black'];
|
|
31665
31665
|
var BASEMAP_SOURCE = 'basemap';
|
|
31666
31666
|
var BUILDINGS_LAYER = 'smap-buildings-3d';
|
|
@@ -34368,7 +34368,9 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
34368
34368
|
|
|
34369
34369
|
/**
|
|
34370
34370
|
* Selects features by drawing on the map: 'box' (press and drag) or 'lasso' (press and draw a free shape). Resolves
|
|
34371
|
-
* with { features: { layerId: [features] }, geometry } once the shape is drawn, or null when Escape cancels it.
|
|
34371
|
+
* with { features: { layerId: [features] }, geometry } once the shape is drawn, or null when Escape cancels it. Every
|
|
34372
|
+
* layer named in `layers` is in `features` (an empty list when nothing of it was caught); without `layers`, only the
|
|
34373
|
+
* layers something was caught in.
|
|
34372
34374
|
* A point (or custom marker) counts when it is inside; a line or area when any of its vertices is.
|
|
34373
34375
|
* @param {Object} [o] mode ('box' default, 'lasso'), layers (default every point, custom marker, line and area layer)
|
|
34374
34376
|
*/
|
|
@@ -34450,7 +34452,8 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
34450
34452
|
(function walk(c) { if (found || !c) { return; } if (typeof c[0] === 'number') { found = inside(c); } else { c.forEach(walk); } })(f.geometry && f.geometry.coordinates);
|
|
34451
34453
|
return found;
|
|
34452
34454
|
});
|
|
34453
|
-
|
|
34455
|
+
// A layer the caller named is always answered, empty when the shape caught none of it.
|
|
34456
|
+
if (hits.length || layers) { out[id] = hits; }
|
|
34454
34457
|
});
|
|
34455
34458
|
return out;
|
|
34456
34459
|
};
|
package/dist/smap.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Generated by js/build.mjs from js/src (see SOURCE.json). Do not edit. */
|
|
2
|
-
/*! sMap Web SDK 1.2.
|
|
2
|
+
/*! sMap Web SDK 1.2.6. Bundles maplibre-gl 6.16.0 (BSD-3-Clause), see vendor-licenses.txt. */
|
|
3
3
|
|
|
4
4
|
var smapCore = null;
|
|
5
5
|
function smapCreateEngine() {
|
|
@@ -31662,7 +31662,7 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
31662
31662
|
})(typeof self !== 'undefined' ? self : this, function (engine, interop, canvasLib, plan) {
|
|
31663
31663
|
'use strict';
|
|
31664
31664
|
|
|
31665
|
-
var VERSION = '1.2.
|
|
31665
|
+
var VERSION = '1.2.6';
|
|
31666
31666
|
var FLAVORS = ['light', 'white', 'grayscale', 'dark', 'black'];
|
|
31667
31667
|
var BASEMAP_SOURCE = 'basemap';
|
|
31668
31668
|
var BUILDINGS_LAYER = 'smap-buildings-3d';
|
|
@@ -34370,7 +34370,9 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
34370
34370
|
|
|
34371
34371
|
/**
|
|
34372
34372
|
* Selects features by drawing on the map: 'box' (press and drag) or 'lasso' (press and draw a free shape). Resolves
|
|
34373
|
-
* with { features: { layerId: [features] }, geometry } once the shape is drawn, or null when Escape cancels it.
|
|
34373
|
+
* with { features: { layerId: [features] }, geometry } once the shape is drawn, or null when Escape cancels it. Every
|
|
34374
|
+
* layer named in `layers` is in `features` (an empty list when nothing of it was caught); without `layers`, only the
|
|
34375
|
+
* layers something was caught in.
|
|
34374
34376
|
* A point (or custom marker) counts when it is inside; a line or area when any of its vertices is.
|
|
34375
34377
|
* @param {Object} [o] mode ('box' default, 'lasso'), layers (default every point, custom marker, line and area layer)
|
|
34376
34378
|
*/
|
|
@@ -34452,7 +34454,8 @@ function smapCreateSdk(engine, interop, canvas, plan) {
|
|
|
34452
34454
|
(function walk(c) { if (found || !c) { return; } if (typeof c[0] === 'number') { found = inside(c); } else { c.forEach(walk); } })(f.geometry && f.geometry.coordinates);
|
|
34453
34455
|
return found;
|
|
34454
34456
|
});
|
|
34455
|
-
|
|
34457
|
+
// A layer the caller named is always answered, empty when the shape caught none of it.
|
|
34458
|
+
if (hits.length || layers) { out[id] = hits; }
|
|
34456
34459
|
});
|
|
34457
34460
|
return out;
|
|
34458
34461
|
};
|
|
@@ -35845,7 +35848,7 @@ function SMapMap(options) {
|
|
|
35845
35848
|
SMapMap.prototype = core.Map.prototype;
|
|
35846
35849
|
return new core.Map(options);
|
|
35847
35850
|
}
|
|
35848
|
-
var smapVersion = "1.2.
|
|
35851
|
+
var smapVersion = "1.2.6";
|
|
35849
35852
|
var smapStyles = ['light', 'white', 'grayscale', 'dark', 'black'];
|
|
35850
35853
|
/** The bundled rendering engine, for anything the SDK does not wrap (loaded on the first call). */
|
|
35851
35854
|
function smapGetEngine() { return smapLoad().engine; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superrouteca/smap",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "sMap for the web: maps from Superroute's sMap service, the Web SDK (map view) and the JS client (tokens, nearest node, styles, tiles).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Goodneo Solutions",
|
package/types/smap.d.cts
CHANGED
|
@@ -727,7 +727,7 @@ export declare class Map {
|
|
|
727
727
|
addPolygons(id: string, data: LayerData, options?: PolygonOptions): this;
|
|
728
728
|
/** A drawing and editing tool (G3): polygons, rectangles, circles, lines and points, holes, snapping, undo. */
|
|
729
729
|
drawTool(options?: DrawToolOptions): DrawTool;
|
|
730
|
-
/** Selects features by drawing a box or a lasso (G4); null when Escape cancels. */
|
|
730
|
+
/** Selects features by drawing a box or a lasso (G4); null when Escape cancels. Every layer named in `layers` is in `features` (empty when nothing of it was caught). */
|
|
731
731
|
selectArea(options?: { mode?: 'box' | 'lasso'; layers?: string[] }): Promise<{ features: Record<string, GeoJSONFeature[]>; geometry: Record<string, unknown> } | null>;
|
|
732
732
|
/** Google's base maps read straight from Google with your Map Tiles session (G10); null takes them off. */
|
|
733
733
|
setGoogleBase(google: GoogleBaseOptions | null): this;
|
package/types/smap.d.mts
CHANGED
|
@@ -727,7 +727,7 @@ export declare class Map {
|
|
|
727
727
|
addPolygons(id: string, data: LayerData, options?: PolygonOptions): this;
|
|
728
728
|
/** A drawing and editing tool (G3): polygons, rectangles, circles, lines and points, holes, snapping, undo. */
|
|
729
729
|
drawTool(options?: DrawToolOptions): DrawTool;
|
|
730
|
-
/** Selects features by drawing a box or a lasso (G4); null when Escape cancels. */
|
|
730
|
+
/** Selects features by drawing a box or a lasso (G4); null when Escape cancels. Every layer named in `layers` is in `features` (empty when nothing of it was caught). */
|
|
731
731
|
selectArea(options?: { mode?: 'box' | 'lasso'; layers?: string[] }): Promise<{ features: Record<string, GeoJSONFeature[]>; geometry: Record<string, unknown> } | null>;
|
|
732
732
|
/** Google's base maps read straight from Google with your Map Tiles session (G10); null takes them off. */
|
|
733
733
|
setGoogleBase(google: GoogleBaseOptions | null): this;
|