ol 7.1.1-dev.1669845937395 → 7.1.1-dev.1669907238748

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Snap.d.ts","sourceRoot":"","sources":["Snap.js"],"names":[],"mappings":";;;;;YA0Bc,OAAO,kBAAkB,EAAE,UAAU,GAAC,IAAI;;;;iBAC1C,OAAO,aAAa,EAAE,KAAK,GAAC,IAAI;;;;;;aAKhC,OAAO,eAAe,EAAE,OAAO;;;;aAC/B,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAoC1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IACE;;OAEG;IACH,2CAoGC;IAnFC;;;OAGG;IACH,gBAAqD;IAErD;;;OAGG;IACH,gBAAmE;IAEnE;;;OAGG;IACH,cAA6D;IAE7D;;;OAGG;IACH,kBAA2D;IAE3D;;;OAGG;IACH,8BAA+B;IAE/B;;;OAGG;IACH,mCAAoC;IAEpC;;;;;OAKG;IACH,gCAAiC;IAEjC;;;;;;OAMG;IACH,yBAA0B;IAE1B;;;OAGG;IACH,wBACoE;IAEpE;;;;OAIG;IACH,eAAyB;IAEzB;;;;OAIG;IACH,6BAUC;IAGH;;;;;;OAMG;IACH,oBALW,OAAO,eAAe,EAAE,OAAO,wCA0CzC;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,8BAEC;IAED;;;OAGG;IACH,qBASC;IAeD;;;OAGG;IACH,0BAGC;IAED;;;OAGG;IACH,6BAGC;IAED;;;OAGG;IACH,6BAUC;IAgBD;;;;;;OAMG;IACH,uBALW,OAAO,eAAe,EAAE,OAAO,wCA0BzC;IAED;;;;;OAKG;IACH,YAFW,OAAO,WAAW,EAAE,OAAO,QAkDrC;IAED;;;;;OAKG;IACH,cALW,OAAO,aAAa,EAAE,KAAK,mBAC3B,OAAO,kBAAkB,EAAE,UAAU,O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Ae,EAAE,OAAO,wCA0BzC;IAED;;;;;OAKG;IACH,YAFW,OAAO,WAAW,EAAE,OAAO,QAkDrC;IAED;;;;;OAKG;IACH,cALW,OAAO,aAAa,EAAE,KAAK,mBAC3B,OAAO,kBAAkB,EAAE,UAAU,OACrC,OAAO,WAAW,EAAE,OAAO,GAC1B,MAAM,GAAC,IAAI,CAuGtB;IAED;;;OAGG;IACH,uBAGC;IAED;;;;OAIG;IACH,+BAiBC;IAED;;;;OAIG;IACH,2CAQC;IAED;;;;OAIG;IACH,mCAKC;IAED;;;;OAIG;IACH,wCAQC;IAED;;;;OAIG;IACH,mCAIC;IAED;;;;OAIG;IACH,qCAWC;IAED;;;;OAIG;IACH,8BAEC;IAED;;;;OAIG;IACH,gCAQC;CACF"}
@@ -7,7 +7,7 @@ import PointerInteraction from './Pointer.js';
7
7
  import RBush from '../structs/RBush.js';
8
8
  import VectorEventType from '../source/VectorEventType.js';
9
9
  import {FALSE, TRUE} from '../functions.js';
10
- import {boundingExtent, createEmpty} from '../extent.js';
10
+ import {boundingExtent, buffer, createEmpty} from '../extent.js';
11
11
  import {
12
12
  closestOnCircle,
13
13
  closestOnSegment,
@@ -18,6 +18,7 @@ import {
18
18
  fromUserCoordinate,
19
19
  getUserProjection,
20
20
  toUserCoordinate,
21
+ toUserExtent,
21
22
  } from '../proj.js';
22
23
  import {getUid} from '../util.js';
23
24
  import {listen, unlistenByKey} from '../events.js';
@@ -427,15 +428,16 @@ class Snap extends PointerInteraction {
427
428
  * @return {Result|null} Snap result
428
429
  */
429
430
  snapTo(pixel, pixelCoordinate, map) {
430
- const lowerLeft = map.getCoordinateFromPixel([
431
- pixel[0] - this.pixelTolerance_,
432
- pixel[1] + this.pixelTolerance_,
433
- ]);
434
- const upperRight = map.getCoordinateFromPixel([
435
- pixel[0] + this.pixelTolerance_,
436
- pixel[1] - this.pixelTolerance_,
437
- ]);
438
- const box = boundingExtent([lowerLeft, upperRight]);
431
+ const projection = map.getView().getProjection();
432
+ const projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);
433
+
434
+ const box = toUserExtent(
435
+ buffer(
436
+ boundingExtent([projectedCoordinate]),
437
+ map.getView().getResolution() * this.pixelTolerance_
438
+ ),
439
+ projection
440
+ );
439
441
 
440
442
  const segments = this.rBush_.getInExtent(box);
441
443
 
@@ -444,9 +446,6 @@ class Snap extends PointerInteraction {
444
446
  return null;
445
447
  }
446
448
 
447
- const projection = map.getView().getProjection();
448
- const projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);
449
-
450
449
  let closestVertex;
451
450
  let minSquaredDistance = Infinity;
452
451
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "7.1.1-dev.1669845937395",
3
+ "version": "7.1.1-dev.1669907238748",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -97,6 +97,7 @@ export type Options = {
97
97
  * Layer source for map tiles from an [OGC API - Tiles](https://ogcapi.ogc.org/tiles/) service that provides "map" type tiles.
98
98
  * The service must conform to at least the core (http://www.opengis.net/spec/ogcapi-tiles-1/1.0/conf/core)
99
99
  * and tileset (http://www.opengis.net/spec/ogcapi-tiles-1/1.0/conf/tileset) conformance classes.
100
+ * @api
100
101
  */
101
102
  declare class OGCMapTile extends TileImage {
102
103
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OGCMapTile.d.ts","sourceRoot":"","sources":["OGCMapTile.js"],"names":[],"mappings":";;;;;SASc,MAAM;;;;;;;;;;;;;;;;iBAKN,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAPjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;GAKG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA0BjB;IAED;;;OAGG;IACH,2BAIC;IAED;;;OAGG;IACH,qBAGC;CACF"}
1
+ {"version":3,"file":"OGCMapTile.d.ts","sourceRoot":"","sources":["OGCMapTile.js"],"names":[],"mappings":";;;;;SASc,MAAM;;;;;;;;;;;;;;;;iBAKN,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAPjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA0BjB;IAED;;;OAGG;IACH,2BAIC;IAED;;;OAGG;IACH,qBAGC;CACF"}
@@ -40,6 +40,7 @@ import {error as logError} from '../console.js';
40
40
  * Layer source for map tiles from an [OGC API - Tiles](https://ogcapi.ogc.org/tiles/) service that provides "map" type tiles.
41
41
  * The service must conform to at least the core (http://www.opengis.net/spec/ogcapi-tiles-1/1.0/conf/core)
42
42
  * and tileset (http://www.opengis.net/spec/ogcapi-tiles-1/1.0/conf/tileset) conformance classes.
43
+ * @api
43
44
  */
44
45
  class OGCMapTile extends TileImage {
45
46
  /**
@@ -101,6 +101,7 @@ export type Options = {
101
101
  * Vector tile sets may come in a variety of formats (e.g. GeoJSON, MVT). The `format` option is used to determine
102
102
  * which of the advertised media types is used. If you need to force the use of a particular media type, you can
103
103
  * provide the `mediaType` option.
104
+ * @api
104
105
  */
105
106
  declare class OGCVectorTile extends VectorTile {
106
107
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OGCVectorTile.d.ts","sourceRoot":"","sources":["OGCVectorTile.js"],"names":[],"mappings":";;;;;SAUc,MAAM;;;;;;;;;YAGN,OAAO,sBAAsB,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUtC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;AAfjD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;GASG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA4BjB;IAED;;;OAGG;IACH,2BAIC;IAED;;;OAGG;IACH,qBAGC;CACF"}
1
+ {"version":3,"file":"OGCVectorTile.d.ts","sourceRoot":"","sources":["OGCVectorTile.js"],"names":[],"mappings":";;;;;SAUc,MAAM;;;;;;;;;YAGN,OAAO,sBAAsB,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUtC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;AAfjD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;;GAUG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA4BjB;IAED;;;OAGG;IACH,2BAIC;IAED;;;OAGG;IACH,qBAGC;CACF"}
@@ -44,6 +44,7 @@ import {error as logError} from '../console.js';
44
44
  * Vector tile sets may come in a variety of formats (e.g. GeoJSON, MVT). The `format` option is used to determine
45
45
  * which of the advertised media types is used. If you need to force the use of a particular media type, you can
46
46
  * provide the `mediaType` option.
47
+ * @api
47
48
  */
48
49
  class OGCVectorTile extends VectorTile {
49
50
  /**
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '7.1.1-dev.1669845937395';
36
+ export const VERSION = '7.1.1-dev.1669907238748';