@vcmap/core 5.0.0-rc.5 → 5.0.0-rc.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.
Files changed (146) hide show
  1. package/README.md +3 -1
  2. package/index.d.ts +1668 -1704
  3. package/index.js +139 -139
  4. package/package.json +5 -7
  5. package/src/{vcs/vcm/category → category}/appBackedCategory.js +1 -1
  6. package/src/{vcs/vcm/category → category}/category.js +8 -8
  7. package/src/{vcs/vcm/category → category}/categoryCollection.js +0 -0
  8. package/src/{vcs/vcm/classRegistry.js → classRegistry.js} +1 -18
  9. package/src/{vcs/vcm/context.js → context.js} +0 -0
  10. package/src/{vcs/vcm/util/featureProvider → featureProvider}/abstractFeatureProvider.js +5 -5
  11. package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderHelpers.js +2 -2
  12. package/src/{vcs/vcm/util/featureProvider → featureProvider}/featureProviderSymbols.js +0 -0
  13. package/src/{vcs/vcm/util/featureProvider → featureProvider}/tileProviderFeatureProvider.js +2 -2
  14. package/src/{vcs/vcm/util/featureProvider → featureProvider}/wmsFeatureProvider.js +9 -8
  15. package/src/{vcs/vcm/globalCollections.js → globalCollections.js} +1 -5
  16. package/src/{vcs/vcm/interaction → interaction}/abstractInteraction.js +19 -17
  17. package/src/{vcs/vcm/interaction → interaction}/coordinateAtPixel.js +5 -8
  18. package/src/{vcs/vcm/interaction → interaction}/eventHandler.js +3 -3
  19. package/src/{vcs/vcm/interaction → interaction}/featureAtPixelInteraction.js +6 -19
  20. package/src/{vcs/vcm/interaction → interaction}/featureProviderInteraction.js +2 -13
  21. package/src/{vcs/vcm/interaction → interaction}/interactionChain.js +11 -31
  22. package/src/{vcs/vcm/interaction → interaction}/interactionType.js +0 -0
  23. package/src/{vcs/vcm/layer/cesium/cesiumTilesetCesium.js → layer/cesium/cesiumTilesetCesiumImpl.js} +3 -3
  24. package/src/{vcs/vcm/layer → layer}/cesium/clusterContext.js +0 -0
  25. package/src/{vcs/vcm/layer/cesium/dataSourceCesium.js → layer/cesium/dataSourceCesiumImpl.js} +5 -2
  26. package/src/{vcs/vcm/layer/cesium/openStreetMapCesium.js → layer/cesium/openStreetMapCesiumImpl.js} +6 -6
  27. package/src/{vcs/vcm/layer/cesium/pointCloudCesium.js → layer/cesium/pointCloudCesiumImpl.js} +6 -6
  28. package/src/{vcs/vcm/layer/cesium/rasterLayerCesium.js → layer/cesium/rasterLayerCesiumImpl.js} +3 -3
  29. package/src/{vcs/vcm/layer/cesium/singleImageCesium.js → layer/cesium/singleImageCesiumImpl.js} +5 -5
  30. package/src/{vcs/vcm/layer/cesium/terrainCesium.js → layer/cesium/terrainCesiumImpl.js} +4 -4
  31. package/src/{vcs/vcm/layer/cesium/tmsCesium.js → layer/cesium/tmsCesiumImpl.js} +6 -6
  32. package/src/{vcs/vcm/layer/cesium/vectorCesium.js → layer/cesium/vectorCesiumImpl.js} +3 -3
  33. package/src/{vcs/vcm/layer → layer}/cesium/vectorContext.js +0 -0
  34. package/src/{vcs/vcm/layer/cesium/vectorRasterTileCesium.js → layer/cesium/vectorRasterTileCesiumImpl.js} +5 -5
  35. package/src/{vcs/vcm/layer → layer}/cesium/vectorTileImageryProvider.js +1 -1
  36. package/src/{vcs/vcm/layer/cesium/wmsCesium.js → layer/cesium/wmsCesiumImpl.js} +6 -6
  37. package/src/{vcs/vcm/layer/cesium/wmtsCesium.js → layer/cesium/wmtsCesiumImpl.js} +6 -6
  38. package/src/{vcs/vcm/layer → layer}/cesium/x3dmHelper.js +0 -0
  39. package/src/{vcs/vcm/layer/cesiumTileset.js → layer/cesiumTilesetLayer.js} +18 -18
  40. package/src/{vcs/vcm/layer/czml.js → layer/czmlLayer.js} +9 -9
  41. package/src/{vcs/vcm/layer/dataSource.js → layer/dataSourceLayer.js} +10 -10
  42. package/src/{vcs/vcm/layer → layer}/featureLayer.js +6 -6
  43. package/src/{vcs/vcm/layer/featureStore.js → layer/featureStoreLayer.js} +43 -43
  44. package/src/{vcs/vcm/layer/featureStoreChanges.js → layer/featureStoreLayerChanges.js} +12 -12
  45. package/src/{vcs/vcm/layer/featureStoreState.js → layer/featureStoreLayerState.js} +1 -1
  46. package/src/{vcs/vcm/layer → layer}/featureVisibility.js +6 -5
  47. package/src/{vcs/vcm/layer → layer}/geojsonHelpers.js +13 -18
  48. package/src/{vcs/vcm/layer/geojson.js → layer/geojsonLayer.js} +11 -11
  49. package/src/{vcs/vcm/layer → layer}/globalHider.js +1 -11
  50. package/src/{vcs/vcm/layer → layer}/layer.js +3 -3
  51. package/src/{vcs/vcm/layer → layer}/layerImplementation.js +2 -2
  52. package/src/{vcs/vcm/layer → layer}/layerState.js +0 -0
  53. package/src/{vcs/vcm/layer → layer}/layerSymbols.js +0 -0
  54. package/src/{vcs/vcm/layer/oblique/layerOblique.js → layer/oblique/layerObliqueImpl.js} +4 -4
  55. package/src/{vcs/vcm/layer → layer}/oblique/obliqueHelpers.js +0 -0
  56. package/src/{vcs/vcm/layer/oblique/vectorOblique.js → layer/oblique/vectorObliqueImpl.js} +6 -6
  57. package/src/{vcs/vcm/layer/openStreetMap.js → layer/openStreetMapLayer.js} +19 -19
  58. package/src/{vcs/vcm/layer/openlayers/layerOpenlayers.js → layer/openlayers/layerOpenlayersImpl.js} +5 -5
  59. package/src/layer/openlayers/openStreetMapOpenlayersImpl.js +27 -0
  60. package/src/{vcs/vcm/layer/openlayers/rasterLayerOpenlayers.js → layer/openlayers/rasterLayerOpenlayersImpl.js} +9 -8
  61. package/src/{vcs/vcm/layer/openlayers/singleImageOpenlayers.js → layer/openlayers/singleImageOpenlayersImpl.js} +6 -6
  62. package/src/{vcs/vcm/layer/openlayers/tileDebugOpenlayers.js → layer/openlayers/tileDebugOpenlayersImpl.js} +5 -5
  63. package/src/{vcs/vcm/layer/openlayers/tmsOpenlayers.js → layer/openlayers/tmsOpenlayersImpl.js} +7 -7
  64. package/src/{vcs/vcm/layer/openlayers/vectorOpenlayers.js → layer/openlayers/vectorOpenlayersImpl.js} +6 -6
  65. package/src/{vcs/vcm/layer/openlayers/vectorTileOpenlayers.js → layer/openlayers/vectorTileOpenlayersImpl.js} +6 -6
  66. package/src/{vcs/vcm/layer/openlayers/wmsOpenlayers.js → layer/openlayers/wmsOpenlayersImpl.js} +7 -7
  67. package/src/{vcs/vcm/layer/openlayers/wmtsOpenlayers.js → layer/openlayers/wmtsOpenlayersImpl.js} +7 -7
  68. package/src/{vcs/vcm/layer/pointCloud.js → layer/pointCloudLayer.js} +18 -18
  69. package/src/{vcs/vcm/layer → layer}/rasterLayer.js +2 -2
  70. package/src/{vcs/vcm/layer/singleImage.js → layer/singleImageLayer.js} +15 -15
  71. package/src/{vcs/vcm/layer → layer}/terrainHelpers.js +0 -0
  72. package/src/{vcs/vcm/layer/terrain.js → layer/terrainLayer.js} +10 -10
  73. package/src/{vcs/vcm/layer → layer}/tileLoadedHelper.js +5 -5
  74. package/src/{vcs/vcm/layer → layer}/tileProvider/mvtTileProvider.js +1 -1
  75. package/src/{vcs/vcm/layer → layer}/tileProvider/staticGeojsonTileProvider.js +4 -4
  76. package/src/{vcs/vcm/layer → layer}/tileProvider/tileProvider.js +4 -4
  77. package/src/{vcs/vcm/layer → layer}/tileProvider/tileProviderFactory.js +2 -2
  78. package/src/{vcs/vcm/layer → layer}/tileProvider/urlTemplateTileProvider.js +2 -2
  79. package/src/{vcs/vcm/layer/tms.js → layer/tmsLayer.js} +16 -16
  80. package/src/{vcs/vcm/layer → layer}/vectorHelpers.js +1 -1
  81. package/src/{vcs/vcm/layer/vector.js → layer/vectorLayer.js} +27 -27
  82. package/src/{vcs/vcm/layer → layer}/vectorProperties.js +3 -3
  83. package/src/{vcs/vcm/layer → layer}/vectorSymbols.js +0 -0
  84. package/src/{vcs/vcm/layer/vectorTile.js → layer/vectorTileLayer.js} +19 -19
  85. package/src/{vcs/vcm/layer/wfs.js → layer/wfsLayer.js} +10 -10
  86. package/src/{vcs/vcm/layer → layer}/wmsHelpers.js +1 -1
  87. package/src/{vcs/vcm/layer/wms.js → layer/wmsLayer.js} +18 -18
  88. package/src/{vcs/vcm/layer/wmts.js → layer/wmtsLayer.js} +17 -17
  89. package/src/{vcs/vcm/maps → map}/baseOLMap.js +3 -3
  90. package/src/{vcs/vcm/maps → map}/cameraLimiter.js +1 -1
  91. package/src/{vcs/vcm/maps/cesium.js → map/cesiumMap.js} +13 -28
  92. package/src/{vcs/vcm/maps → map}/mapState.js +0 -0
  93. package/src/{vcs/vcm/maps/oblique.js → map/obliqueMap.js} +31 -45
  94. package/src/{vcs/vcm/maps/openlayers.js → map/openlayersMap.js} +14 -11
  95. package/src/{vcs/vcm/maps/map.js → map/vcsMap.js} +5 -5
  96. package/src/oblique/defaultObliqueCollection.js +62 -0
  97. package/src/{vcs/vcm/oblique → oblique}/helpers.js +1 -1
  98. package/src/{vcs/vcm/oblique/ObliqueCollection.js → oblique/obliqueCollection.js} +39 -10
  99. package/src/{vcs/vcm/oblique/ObliqueDataSet.js → oblique/obliqueDataSet.js} +1 -1
  100. package/src/{vcs/vcm/oblique/ObliqueImage.js → oblique/obliqueImage.js} +0 -0
  101. package/src/{vcs/vcm/oblique/ObliqueImageMeta.js → oblique/obliqueImageMeta.js} +2 -2
  102. package/src/{vcs/vcm/oblique/ObliqueProvider.js → oblique/obliqueProvider.js} +9 -6
  103. package/src/{vcs/vcm/oblique/ObliqueView.js → oblique/obliqueView.js} +31 -1
  104. package/src/{vcs/vcm/oblique/ObliqueViewDirection.js → oblique/obliqueViewDirection.js} +0 -0
  105. package/src/{vcs/vcm/oblique → oblique}/parseImageJson.js +3 -3
  106. package/src/ol/geom/circle.js +1 -1
  107. package/src/{vcs/vcm/util/style → style}/declarativeStyleItem.js +3 -3
  108. package/src/{vcs/vcm/util/style → style}/shapesCategory.js +0 -0
  109. package/src/{vcs/vcm/util/style → style}/styleFactory.js +2 -2
  110. package/src/{vcs/vcm/util/style → style}/styleHelpers.js +1 -1
  111. package/src/{vcs/vcm/util/style → style}/styleItem.js +4 -4
  112. package/src/{vcs/vcm/util/style → style}/vectorStyleItem.js +6 -6
  113. package/src/{vcs/vcm/util/style → style}/writeStyle.js +0 -0
  114. package/src/{vcs/vcm/util → util}/clipping/clippingObject.js +10 -10
  115. package/src/{vcs/vcm/util → util}/clipping/clippingObjectManager.js +2 -2
  116. package/src/{vcs/vcm/util → util}/clipping/clippingPlaneHelper.js +0 -0
  117. package/src/{vcs/vcm/util → util}/collection.js +1 -1
  118. package/src/{vcs/vcm/util → util}/dateTime.js +0 -0
  119. package/src/{vcs/vcm/util → util}/exclusiveManager.js +0 -0
  120. package/src/{vcs/vcm/util → util}/extent.js +1 -1
  121. package/src/{vcs/vcm/util → util}/featureconverter/circleToCesium.js +0 -0
  122. package/src/{vcs/vcm/util → util}/featureconverter/convert.js +0 -0
  123. package/src/{vcs/vcm/util → util}/featureconverter/extent3D.js +0 -0
  124. package/src/{vcs/vcm/util → util}/featureconverter/featureconverterHelper.js +1 -1
  125. package/src/{vcs/vcm/util → util}/featureconverter/lineStringToCesium.js +0 -0
  126. package/src/{vcs/vcm/util → util}/featureconverter/pointToCesium.js +1 -1
  127. package/src/{vcs/vcm/util → util}/featureconverter/polygonToCesium.js +1 -1
  128. package/src/{vcs/vcm/util → util}/fetch.js +0 -0
  129. package/src/{vcs/vcm/util → util}/geometryHelpers.js +0 -0
  130. package/src/{vcs/vcm/util → util}/indexedCollection.js +1 -1
  131. package/src/{vcs/vcm/util → util}/isMobile.js +0 -0
  132. package/src/{vcs/vcm/util → util}/layerCollection.js +1 -1
  133. package/src/{vcs/vcm/util → util}/locale.js +1 -1
  134. package/src/{vcs/vcm/util → util}/mapCollection.js +63 -21
  135. package/src/{vcs/vcm/util → util}/math.js +0 -0
  136. package/src/{vcs/vcm/util → util}/overrideCollection.js +1 -1
  137. package/src/{vcs/vcm/util → util}/projection.js +5 -21
  138. package/src/{vcs/vcm/util → util}/splitScreen.js +3 -3
  139. package/src/{vcs/vcm/util → util}/urlHelpers.js +0 -0
  140. package/src/{vcs/vcm/util → util}/viewpoint.js +2 -2
  141. package/src/{vcs/vcm/vcsApp.js → vcsApp.js} +18 -5
  142. package/src/{vcs/vcm/vcsAppContextHelpers.js → vcsAppContextHelpers.js} +2 -2
  143. package/src/{vcs/vcm/event/vcsEvent.js → vcsEvent.js} +2 -2
  144. package/src/{vcs/vcm/object.js → vcsObject.js} +1 -9
  145. package/src/vcs/vcm/layer/buildings.js +0 -17
  146. package/src/vcs/vcm/layer/openlayers/openStreetMapOpenlayers.js +0 -27
@@ -8,13 +8,13 @@ import Circle from 'ol/geom/Circle.js';
8
8
  import { getDistance as haversineDistance } from 'ol/sphere.js';
9
9
  import { getLogger as getLoggerByName } from '@vcsuite/logger';
10
10
  import Projection, { mercatorProjection, wgs84Projection } from '../util/projection.js';
11
- import VectorStyleItem, { defaultVectorStyle, vectorStyleSymbol } from '../util/style/vectorStyleItem.js';
12
- import { parseColor } from '../util/style/styleHelpers.js';
13
- import Vector from './vector.js';
14
- import { featureStoreStateSymbol } from './featureStoreState.js';
15
- import { StyleType } from '../util/style/styleItem.js';
16
- import writeStyle, { embedIconsInStyle } from '../util/style/writeStyle.js';
17
- import DeclarativeStyleItem from '../util/style/declarativeStyleItem.js';
11
+ import VectorStyleItem, { defaultVectorStyle, vectorStyleSymbol } from '../style/vectorStyleItem.js';
12
+ import { parseColor } from '../style/styleHelpers.js';
13
+ import VectorLayer from './vectorLayer.js';
14
+ import { featureStoreStateSymbol } from './featureStoreLayerState.js';
15
+ import { StyleType } from '../style/styleItem.js';
16
+ import { embedIconsInStyle } from '../style/writeStyle.js';
17
+ import DeclarativeStyleItem from '../style/declarativeStyleItem.js';
18
18
  import { vcsMetaVersion } from './layer.js';
19
19
  import Extent3D from '../util/featureconverter/extent3D.js';
20
20
  import { styleCollection } from '../globalCollections.js';
@@ -42,7 +42,7 @@ function getFormat() {
42
42
  * @returns {import("@vcsuite/logger").Logger}
43
43
  */
44
44
  function getLogger() {
45
- return getLoggerByName('vcs.vcm.layer.GeoJSONHelper');
45
+ return getLoggerByName('GeoJSONHelper');
46
46
  }
47
47
 
48
48
  /**
@@ -92,7 +92,7 @@ export function getEPSGCodeFromGeojson(geojson) {
92
92
  if (crs.type === 'name') {
93
93
  return crs.properties.name;
94
94
  } else if (crs.type === 'EPSG') {
95
- // 'EPSG' is not part of the GeoJSON specification, but is generated by
95
+ // 'EPSG' is not part of the GeojsonLayer specification, but is generated by
96
96
  // GeoServer.
97
97
  // TODO: remove this when http://jira.codehaus.org/browse/GEOS-5996
98
98
  // is fixed and widely deployed.
@@ -141,7 +141,7 @@ export function updateLegacyFeature(feature) {
141
141
  function readGeometry(geometryObj, options) {
142
142
  const geometry = getFormat().readGeometry(geometryObj, options.formatOptions);
143
143
  if (String(options.formatOptions.featureProjection) === 'EPSG:3857') {
144
- geometry[Vector.alreadyTransformedToMercator] = true;
144
+ geometry[VectorLayer.alreadyTransformedToMercator] = true;
145
145
  }
146
146
  removeEndingVertexFromGeometry(geometry);
147
147
  return new Feature({ geometry });
@@ -246,7 +246,7 @@ function readFeature(featureObj, options) {
246
246
  geometry = circleFromCenterRadius(coordinates, radius);
247
247
  }
248
248
  if (String(options.formatOptions.featureProjection) === 'EPSG:3857') {
249
- geometry[Vector.alreadyTransformedToMercator] = true;
249
+ geometry[VectorLayer.alreadyTransformedToMercator] = true;
250
250
  }
251
251
 
252
252
  featureObj.vcsMeta = featureObj.vcsMeta || {};
@@ -288,7 +288,7 @@ function readFeature(featureObj, options) {
288
288
  }
289
289
 
290
290
  /**
291
- * parses a string to GeoJSON
291
+ * parses a string to GeojsonLayer
292
292
  * @param {string|Object} input
293
293
  * @param {GeoJSONreadOptions=} readOptions
294
294
  * @returns {GeoJSONData}
@@ -425,7 +425,7 @@ export function writeGeoJSONFeature(feature, options = {}, embeddedIcons) {
425
425
  }
426
426
 
427
427
  /**
428
- * Writes all the features of the current layer to GeoJSON
428
+ * Writes all the features of the current layer to GeojsonLayer
429
429
  * @param {GeoJSONData} data
430
430
  * @param {GeoJSONwriteOptions=} options
431
431
  * @returns {string|Object}
@@ -441,10 +441,5 @@ export function writeGeoJSON(data, options = {}) { // how to handel embedded ico
441
441
  vcsMeta,
442
442
  };
443
443
 
444
- if (options.writeStyle && data.style) { // legacy fallback for plugin use
445
- getLogger().deprecate('data.style', 'use layer.getVcsMeta and pass that in instead');
446
- writeStyle(data.style, obj.vcsMeta);
447
- }
448
-
449
444
  return options.asObject ? obj : JSON.stringify(obj, null, options.prettyPrint ? 2 : null);
450
445
  }
@@ -1,4 +1,4 @@
1
- import Vector from './vector.js';
1
+ import VectorLayer from './vectorLayer.js';
2
2
  import { parseGeoJSON, writeGeoJSONFeature } from './geojsonHelpers.js';
3
3
  import Projection, { wgs84Projection } from '../util/projection.js';
4
4
  import { VcsClassRegistry } from '../classRegistry.js';
@@ -6,7 +6,7 @@ import { requestJson } from '../util/fetch.js';
6
6
 
7
7
  /**
8
8
  * @typedef {VectorOptions} GeoJSONOptions
9
- * @property {Array<Object>|undefined} features - an array of GeoJSON features to parse
9
+ * @property {Array<Object>|undefined} features - an array of GeojsonLayer features to parse
10
10
  * @api
11
11
  */
12
12
 
@@ -18,21 +18,21 @@ export const featureFromOptions = Symbol('featureFromOptions');
18
18
 
19
19
 
20
20
  /**
21
- * GeoJSON layer for Cesium, Openlayers and Oblique
21
+ * GeojsonLayer layer for Cesium, OpenlayersMap and ObliqueMap
22
22
  * @class
23
23
  * @export
24
- * @extends {Vector}
24
+ * @extends {VectorLayer}
25
25
  * @api stable
26
26
  */
27
- class GeoJSON extends Vector {
28
- static get className() { return 'vcs.vcm.layer.GeoJSON'; }
27
+ class GeoJSONLayer extends VectorLayer {
28
+ static get className() { return 'GeoJSONLayer'; }
29
29
 
30
30
  /**
31
31
  * @returns {GeoJSONOptions}
32
32
  */
33
33
  static getDefaultOptions() {
34
34
  return {
35
- ...Vector.getDefaultOptions(),
35
+ ...VectorLayer.getDefaultOptions(),
36
36
  projection: wgs84Projection.toJSON(),
37
37
  features: undefined,
38
38
  };
@@ -42,7 +42,7 @@ class GeoJSON extends Vector {
42
42
  * @param {GeoJSONOptions} options
43
43
  */
44
44
  constructor(options) {
45
- const defaultOptions = GeoJSON.getDefaultOptions();
45
+ const defaultOptions = GeoJSONLayer.getDefaultOptions();
46
46
  options.projection = options.projection || defaultOptions.projection;
47
47
 
48
48
  super(options);
@@ -149,7 +149,7 @@ class GeoJSON extends Vector {
149
149
  */
150
150
  toJSON() {
151
151
  const config = /** @type {GeoJSONOptions} */ (super.toJSON());
152
- const defaultOptions = GeoJSON.getDefaultOptions();
152
+ const defaultOptions = GeoJSONLayer.getDefaultOptions();
153
153
 
154
154
  const defaultProjection = new Projection(defaultOptions.projection);
155
155
  if (!this.projection.equals(defaultProjection)) {
@@ -179,5 +179,5 @@ class GeoJSON extends Vector {
179
179
  }
180
180
  }
181
181
 
182
- VcsClassRegistry.registerClass(GeoJSON.className, GeoJSON);
183
- export default GeoJSON;
182
+ VcsClassRegistry.registerClass(GeoJSONLayer.className, GeoJSONLayer);
183
+ export default GeoJSONLayer;
@@ -1,5 +1,4 @@
1
1
  import { check } from '@vcsuite/check';
2
- import { getLogger } from '@vcsuite/logger';
3
2
  import {
4
3
  globalHidden,
5
4
  hideFeature,
@@ -7,7 +6,7 @@ import {
7
6
  showFeature,
8
7
  FeatureVisibilityAction,
9
8
  } from './featureVisibility.js';
10
- import VcsEvent from '../event/vcsEvent.js';
9
+ import VcsEvent from '../vcsEvent.js';
11
10
 
12
11
  /**
13
12
  * @type {GlobalHider}
@@ -145,13 +144,4 @@ export function getGlobalHider() {
145
144
  return instance;
146
145
  }
147
146
 
148
- /**
149
- * @returns {GlobalHider}
150
- * @deprecated v4.1
151
- */
152
- export function getInstance() {
153
- getLogger('vcs.vcm.layer.GlobalHider').deprecate('getInstance', 'use getGlobalHider instead');
154
- return getGlobalHider();
155
- }
156
-
157
147
  export default GlobalHider;
@@ -1,11 +1,11 @@
1
1
  import { check } from '@vcsuite/check';
2
2
  import { parseBoolean, parseInteger } from '@vcsuite/parsers';
3
- import VcsObject from '../object.js';
3
+ import VcsObject from '../vcsObject.js';
4
4
  import Extent from '../util/extent.js';
5
5
  import { getGlobalHider } from './globalHider.js';
6
6
  import { vcsLayerName } from './layerSymbols.js';
7
7
  import LayerState from './layerState.js';
8
- import VcsEvent from '../event/vcsEvent.js';
8
+ import VcsEvent from '../vcsEvent.js';
9
9
  import { getCurrentLocale, getLocaleChangedEvent } from '../util/locale.js';
10
10
  import { VcsClassRegistry } from '../classRegistry.js';
11
11
 
@@ -106,7 +106,7 @@ export const vcsMetaVersion = '2.0';
106
106
  */
107
107
  class Layer extends VcsObject {
108
108
  /** @type {string} */
109
- static get className() { return 'vcs.vcm.layer.Layer'; }
109
+ static get className() { return 'Layer'; }
110
110
 
111
111
  /**
112
112
  * Symbol to declare a layers name on its visualizations, e.g. ol.layer.Layer, Cesium.Cesium3DTileset
@@ -1,4 +1,4 @@
1
- import VcsObject from '../object.js';
1
+ import VcsObject from '../vcsObject.js';
2
2
  import LayerState from './layerState.js';
3
3
 
4
4
  /**
@@ -11,7 +11,7 @@ import LayerState from './layerState.js';
11
11
  * @template {import("@vcmap/core").VcsMap} T
12
12
  */
13
13
  class LayerImplementation extends VcsObject {
14
- static get className() { return 'vcs.vcm.layer.LayerImplementation'; }
14
+ static get className() { return 'LayerImplementation'; }
15
15
 
16
16
  /**
17
17
  * @param {T} map
File without changes
File without changes
@@ -3,12 +3,12 @@ import { vcsLayerName } from '../layerSymbols.js';
3
3
 
4
4
  /**
5
5
  * @class
6
- * @extends {LayerImplementation<import("@vcmap/core").Oblique>}}
6
+ * @extends {LayerImplementation<import("@vcmap/core").ObliqueMap>}}
7
7
  * @abstract
8
8
  */
9
- class LayerOblique extends LayerImplementation {
9
+ class LayerObliqueImpl extends LayerImplementation {
10
10
  /**
11
- * @param {import("@vcmap/core").Oblique} map
11
+ * @param {import("@vcmap/core").ObliqueMap} map
12
12
  * @param {LayerImplementationOptions} options
13
13
  */
14
14
  constructor(map, options) {
@@ -73,4 +73,4 @@ class LayerOblique extends LayerImplementation {
73
73
  }
74
74
  }
75
75
 
76
- export default LayerOblique;
76
+ export default LayerObliqueImpl;
@@ -13,21 +13,21 @@ import {
13
13
  obliqueGeometry,
14
14
  originalFeatureSymbol,
15
15
  } from '../vectorSymbols.js';
16
- import LayerOblique from './layerOblique.js';
16
+ import LayerObliqueImpl from './layerObliqueImpl.js';
17
17
  import { synchronizeFeatureVisibilityWithSource } from '../vectorHelpers.js';
18
18
 
19
19
  /**
20
20
  * represents a specific vector layer for oblique.
21
21
  * @class
22
22
  * @export
23
- * @extends {LayerOblique}
23
+ * @extends {LayerObliqueImpl}
24
24
  * @implements {FeatureLayerImplementation}
25
25
  */
26
- class VectorOblique extends LayerOblique {
27
- static get className() { return 'vcs.vcm.layer.oblique.VectorOblique'; }
26
+ class VectorObliqueImpl extends LayerObliqueImpl {
27
+ static get className() { return 'VectorObliqueImpl'; }
28
28
 
29
29
  /**
30
- * @param {import("@vcmap/core").Oblique} map
30
+ * @param {import("@vcmap/core").ObliqueMap} map
31
31
  * @param {VectorImplementationOptions} options
32
32
  */
33
33
  constructor(map, options) {
@@ -466,4 +466,4 @@ class VectorOblique extends LayerOblique {
466
466
  }
467
467
  }
468
468
 
469
- export default VectorOblique;
469
+ export default VectorObliqueImpl;
@@ -2,11 +2,11 @@ import { ImagerySplitDirection } from '@vcmap/cesium';
2
2
 
3
3
  import { parseNumberRange, parseInteger } from '@vcsuite/parsers';
4
4
  import Layer from './layer.js';
5
- import Openlayers from '../maps/openlayers.js';
6
- import CesiumMap from '../maps/cesium.js';
7
- import OpenStreetMapOpenlayers from './openlayers/openStreetMapOpenlayers.js';
8
- import OpenStreetMapCesium from './cesium/openStreetMapCesium.js';
9
- import VcsEvent from '../event/vcsEvent.js';
5
+ import OpenlayersMap from '../map/openlayersMap.js';
6
+ import CesiumMap from '../map/cesiumMap.js';
7
+ import OpenStreetMapOpenlayersImpl from './openlayers/openStreetMapOpenlayersImpl.js';
8
+ import OpenStreetMapCesiumImpl from './cesium/openStreetMapCesiumImpl.js';
9
+ import VcsEvent from '../vcsEvent.js';
10
10
  import { VcsClassRegistry } from '../classRegistry.js';
11
11
 
12
12
  /**
@@ -18,15 +18,15 @@ import { VcsClassRegistry } from '../classRegistry.js';
18
18
  */
19
19
 
20
20
  /**
21
- * OpenStreetMap Layer
21
+ * OpenStreetMapLayer Layer
22
22
  * @class
23
23
  * @export
24
24
  * @extends {Layer}
25
25
  * @api stable
26
26
  * @implements {SplitLayer}
27
27
  */
28
- class OpenStreetMap extends Layer {
29
- static get className() { return 'vcs.vcm.layer.OpenStreetMap'; }
28
+ class OpenStreetMapLayer extends Layer {
29
+ static get className() { return 'OpenStreetMapLayer'; }
30
30
 
31
31
  /**
32
32
  * @returns {OpenStreetMapOptions}
@@ -45,7 +45,7 @@ class OpenStreetMap extends Layer {
45
45
  */
46
46
  constructor(options) {
47
47
  super(options);
48
- const defaultOptions = OpenStreetMap.getDefaultOptions();
48
+ const defaultOptions = OpenStreetMapLayer.getDefaultOptions();
49
49
  /**
50
50
  * @type {import("@vcmap/cesium").ImagerySplitDirection}
51
51
  * @private
@@ -60,7 +60,7 @@ class OpenStreetMap extends Layer {
60
60
 
61
61
  this._supportedMaps = [
62
62
  CesiumMap.className,
63
- Openlayers.className,
63
+ OpenlayersMap.className,
64
64
  ];
65
65
 
66
66
  /**
@@ -97,7 +97,7 @@ class OpenStreetMap extends Layer {
97
97
  if (direction !== this._splitDirection) {
98
98
  this._splitDirection = direction;
99
99
  this.getImplementations().forEach((impl) => {
100
- /** @type {OpenStreetMapCesium|OpenStreetMapOpenlayers} */
100
+ /** @type {OpenStreetMapCesiumImpl|OpenStreetMapOpenlayersImpl} */
101
101
  (impl).updateSplitDirection(this._splitDirection);
102
102
  });
103
103
  this.splitDirectionChanged.raiseEvent(this._splitDirection);
@@ -119,7 +119,7 @@ class OpenStreetMap extends Layer {
119
119
  if (this._opacity !== parsedValue) {
120
120
  this._opacity = parsedValue;
121
121
  this.getImplementations().forEach((impl) => {
122
- /** @type {OpenStreetMapCesium|OpenStreetMapOpenlayers} */
122
+ /** @type {OpenStreetMapCesiumImpl|OpenStreetMapOpenlayersImpl} */
123
123
  (impl).updateOpacity(parsedValue);
124
124
  });
125
125
  }
@@ -143,15 +143,15 @@ class OpenStreetMap extends Layer {
143
143
  /**
144
144
  * @inheritDoc
145
145
  * @param {import("@vcmap/core").VcsMap} map
146
- * @returns {Array<OpenStreetMapOpenlayers|OpenStreetMapCesium>}
146
+ * @returns {Array<OpenStreetMapOpenlayersImpl|OpenStreetMapCesiumImpl>}
147
147
  */
148
148
  createImplementationsForMap(map) {
149
- if (map instanceof Openlayers) {
150
- return [new OpenStreetMapOpenlayers(map, this.getImplementationOptions())];
149
+ if (map instanceof OpenlayersMap) {
150
+ return [new OpenStreetMapOpenlayersImpl(map, this.getImplementationOptions())];
151
151
  }
152
152
 
153
153
  if (map instanceof CesiumMap) {
154
- return [new OpenStreetMapCesium(map, this.getImplementationOptions())];
154
+ return [new OpenStreetMapCesiumImpl(map, this.getImplementationOptions())];
155
155
  }
156
156
  return [];
157
157
  }
@@ -162,7 +162,7 @@ class OpenStreetMap extends Layer {
162
162
  */
163
163
  toJSON() {
164
164
  const config = /** @type {OpenStreetMapOptions} */ (super.toJSON());
165
- const defaultOptions = OpenStreetMap.getDefaultOptions();
165
+ const defaultOptions = OpenStreetMapLayer.getDefaultOptions();
166
166
 
167
167
  if (this._splitDirection !== ImagerySplitDirection.NONE) {
168
168
  config.splitDirection = this._splitDirection === ImagerySplitDirection.RIGHT ?
@@ -190,5 +190,5 @@ class OpenStreetMap extends Layer {
190
190
  }
191
191
  }
192
192
 
193
- VcsClassRegistry.registerClass(OpenStreetMap.className, OpenStreetMap);
194
- export default OpenStreetMap;
193
+ VcsClassRegistry.registerClass(OpenStreetMapLayer.className, OpenStreetMapLayer);
194
+ export default OpenStreetMapLayer;
@@ -5,13 +5,13 @@ import LayerImplementation from '../layerImplementation.js';
5
5
  * Layer implementation for {@link CesiumMap}.
6
6
  * @class
7
7
  * @export
8
- * @extends {LayerImplementation<import("@vcmap/core").Openlayers>}}
8
+ * @extends {LayerImplementation<import("@vcmap/core").OpenlayersMap>}}
9
9
  */
10
- class LayerOpenlayers extends LayerImplementation {
11
- static get className() { return 'vcs.vcm.layer.openlayers.LayerOpenlayers'; }
10
+ class LayerOpenlayersImpl extends LayerImplementation {
11
+ static get className() { return 'LayerOpenlayersImpl'; }
12
12
 
13
13
  /**
14
- * @param {import("@vcmap/core").Openlayers} map
14
+ * @param {import("@vcmap/core").OpenlayersMap} map
15
15
  * @param {LayerImplementationOptions} options
16
16
  */
17
17
  constructor(map, options) {
@@ -76,4 +76,4 @@ class LayerOpenlayers extends LayerImplementation {
76
76
  }
77
77
  }
78
78
 
79
- export default LayerOpenlayers;
79
+ export default LayerOpenlayersImpl;
@@ -0,0 +1,27 @@
1
+ import Tile from 'ol/layer/Tile.js';
2
+ import OSM from 'ol/source/OSM.js';
3
+ import RasterLayerOpenlayersImpl from './rasterLayerOpenlayersImpl.js';
4
+
5
+ /**
6
+ * represents a specific OpenStreetMapLayer layer for openlayers.
7
+ * @class
8
+ * @export
9
+ * @extends {RasterLayerOpenlayersImpl}
10
+ */
11
+ class OpenStreetMapOpenlayersImpl extends RasterLayerOpenlayersImpl {
12
+ static get className() { return 'OpenStreetMapOpenlayersImpl'; }
13
+
14
+ /**
15
+ * @returns {import("ol/layer/Tile").default}
16
+ */
17
+ getOLLayer() {
18
+ return new Tile({
19
+ opacity: this.opacity,
20
+ source: new OSM({
21
+ maxZoom: this.maxLevel,
22
+ }),
23
+ });
24
+ }
25
+ }
26
+
27
+ export default OpenStreetMapOpenlayersImpl;
@@ -1,19 +1,19 @@
1
1
  import { ImagerySplitDirection } from '@vcmap/cesium';
2
2
  import { unByKey } from 'ol/Observable.js';
3
- import LayerOpenlayers from './layerOpenlayers.js';
3
+ import LayerOpenlayersImpl from './layerOpenlayersImpl.js';
4
4
 
5
5
  /**
6
6
  * RasterLayer implementation for {@link Openlayers}
7
7
  * @class
8
- * @extends {LayerOpenlayers}
8
+ * @extends {LayerOpenlayersImpl}
9
9
  * @implements {RasterLayerImplementation}
10
10
  * @abstract
11
11
  */
12
- class RasterLayerOpenlayers extends LayerOpenlayers {
13
- static get className() { return 'vcs.vcm.layer.openlayers.RasterLayerOpenlayers'; }
12
+ class RasterLayerOpenlayersImpl extends LayerOpenlayersImpl {
13
+ static get className() { return 'RasterLayerOpenlayersImpl'; }
14
14
 
15
15
  /**
16
- * @param {import("@vcmap/core").Openlayers} map
16
+ * @param {import("@vcmap/core").OpenlayersMap} map
17
17
  * @param {RasterLayerImplementationOptions} options
18
18
  */
19
19
  constructor(map, options) {
@@ -77,7 +77,7 @@ class RasterLayerOpenlayers extends LayerOpenlayers {
77
77
  this._splitDirectionRenderListeners
78
78
  .push(/** @type {import("ol/events").EventsKey} */
79
79
  (this.olLayer.on('postrender', (/** @type {import("ol/render/Event").default} */ event) => {
80
- event.context.restore();
80
+ /** @type {CanvasRenderingContext2D} */ (event.context).restore();
81
81
  })),
82
82
  );
83
83
  this.olLayer.changed();
@@ -93,7 +93,8 @@ class RasterLayerOpenlayers extends LayerOpenlayers {
93
93
  if (!this.map.splitScreen) {
94
94
  return;
95
95
  }
96
- const { context } = event;
96
+ // eslint-disable-next-line prefer-destructuring
97
+ const context = /** @type {CanvasRenderingContext2D} */ (event.context);
97
98
  const width = context.canvas.width * this.map.splitScreen.position;
98
99
  context.save();
99
100
  context.beginPath();
@@ -118,4 +119,4 @@ class RasterLayerOpenlayers extends LayerOpenlayers {
118
119
  }
119
120
  }
120
121
 
121
- export default RasterLayerOpenlayers;
122
+ export default RasterLayerOpenlayersImpl;
@@ -1,6 +1,6 @@
1
1
  import ImageLayer from 'ol/layer/Image.js';
2
2
  import ImageStatic from 'ol/source/ImageStatic.js';
3
- import RasterLayerOpenlayers from './rasterLayerOpenlayers.js';
3
+ import RasterLayerOpenlayersImpl from './rasterLayerOpenlayersImpl.js';
4
4
  import { wgs84Projection } from '../../util/projection.js';
5
5
  import { isSameOrigin } from '../../util/urlHelpers.js';
6
6
 
@@ -8,13 +8,13 @@ import { isSameOrigin } from '../../util/urlHelpers.js';
8
8
  * represents a specific OpenLayers SingleImageLayer Layer class.
9
9
  * @class
10
10
  * @export
11
- * @extends {RasterLayerOpenlayers}
11
+ * @extends {RasterLayerOpenlayersImpl}
12
12
  */
13
- class SingleImageOpenlayers extends RasterLayerOpenlayers {
14
- static get className() { return 'vcs.vcm.layer.openlayers.SingleImageOpenlayers'; }
13
+ class SingleImageOpenlayersImpl extends RasterLayerOpenlayersImpl {
14
+ static get className() { return 'SingleImageOpenlayersImpl'; }
15
15
 
16
16
  /**
17
- * @param {import("@vcmap/core").Openlayers} map
17
+ * @param {import("@vcmap/core").OpenlayersMap} map
18
18
  * @param {SingleImageImplementationOptions} options
19
19
  */
20
20
  constructor(map, options) {
@@ -46,4 +46,4 @@ class SingleImageOpenlayers extends RasterLayerOpenlayers {
46
46
  }
47
47
  }
48
48
 
49
- export default SingleImageOpenlayers;
49
+ export default SingleImageOpenlayersImpl;
@@ -1,16 +1,16 @@
1
1
  import Tile from 'ol/layer/Tile.js';
2
2
  import TileDebug from 'ol/source/TileDebug.js';
3
- import LayerOpenlayers from './layerOpenlayers.js';
3
+ import LayerOpenlayersImpl from './layerOpenlayersImpl.js';
4
4
 
5
5
  /**
6
6
  * layer Implementation to render tile boundaries.
7
7
  * @class
8
8
  * @export
9
- * @extends {LayerOpenlayers}
9
+ * @extends {LayerOpenlayersImpl}
10
10
  * @implements {VectorTileImplementation}
11
11
  */
12
- class TileDebugOpenlayers extends LayerOpenlayers {
13
- static get className() { return 'vcs.vcm.layer.openlayers.TileDebugOpenlayers'; }
12
+ class TileDebugOpenlayersImpl extends LayerOpenlayersImpl {
13
+ static get className() { return 'TileDebugOpenlayersImpl'; }
14
14
 
15
15
  /**
16
16
  * @returns {import("ol/layer/Tile").default}
@@ -36,4 +36,4 @@ class TileDebugOpenlayers extends LayerOpenlayers {
36
36
  updateTiles(args) {}
37
37
  }
38
38
 
39
- export default TileDebugOpenlayers;
39
+ export default TileDebugOpenlayersImpl;
@@ -1,21 +1,21 @@
1
1
  import XYZ from 'ol/source/XYZ.js';
2
2
  import Tile from 'ol/layer/Tile.js';
3
3
  import { mercatorProjection } from '../../util/projection.js';
4
- import RasterLayerOpenlayers from './rasterLayerOpenlayers.js';
4
+ import RasterLayerOpenlayersImpl from './rasterLayerOpenlayersImpl.js';
5
5
  import { TilingScheme } from '../rasterLayer.js';
6
6
  import { isSameOrigin } from '../../util/urlHelpers.js';
7
7
 
8
8
  /**
9
- * TMS implementation for {@link Openlayers}.
9
+ * TmsLayer implementation for {@link Openlayers}.
10
10
  * @class
11
11
  * @export
12
- * @extends {RasterLayerOpenlayers}
12
+ * @extends {RasterLayerOpenlayersImpl}
13
13
  */
14
- class TMSOpenlayers extends RasterLayerOpenlayers {
15
- static get className() { return 'vcs.vcm.layer.openlayers.TMSOpenlayers'; }
14
+ class TmsOpenlayersImpl extends RasterLayerOpenlayersImpl {
15
+ static get className() { return 'TmsOpenlayersImpl'; }
16
16
 
17
17
  /**
18
- * @param {import("@vcmap/core").Openlayers} map
18
+ * @param {import("@vcmap/core").OpenlayersMap} map
19
19
  * @param {TMSImplementationOptions} options
20
20
  */
21
21
  constructor(map, options) {
@@ -59,4 +59,4 @@ class TMSOpenlayers extends RasterLayerOpenlayers {
59
59
  }
60
60
  }
61
61
 
62
- export default TMSOpenlayers;
62
+ export default TmsOpenlayersImpl;
@@ -1,5 +1,5 @@
1
1
  import OLVectorLayer from 'ol/layer/Vector.js';
2
- import LayerOpenlayers from './layerOpenlayers.js';
2
+ import LayerOpenlayersImpl from './layerOpenlayersImpl.js';
3
3
  import { synchronizeFeatureVisibilityWithSource } from '../vectorHelpers.js';
4
4
  import { getGlobalHider } from '../globalHider.js';
5
5
 
@@ -8,13 +8,13 @@ import { getGlobalHider } from '../globalHider.js';
8
8
  * @class
9
9
  * @export
10
10
  * @implements {FeatureLayerImplementation}
11
- * @extends {LayerOpenlayers}
11
+ * @extends {LayerOpenlayersImpl}
12
12
  */
13
- class VectorOpenlayers extends LayerOpenlayers {
14
- static get className() { return 'vcs.vcm.layer.openlayers.VectorOpenlayers'; }
13
+ class VectorOpenlayersImpl extends LayerOpenlayersImpl {
14
+ static get className() { return 'VectorOpenlayersImpl'; }
15
15
 
16
16
  /**
17
- * @param {import("@vcmap/core").Openlayers} map
17
+ * @param {import("@vcmap/core").OpenlayersMap} map
18
18
  * @param {VectorImplementationOptions} options
19
19
  */
20
20
  constructor(map, options) {
@@ -115,4 +115,4 @@ class VectorOpenlayers extends LayerOpenlayers {
115
115
  }
116
116
  }
117
117
 
118
- export default VectorOpenlayers;
118
+ export default VectorOpenlayersImpl;
@@ -1,7 +1,7 @@
1
1
  import OLVectorTileLayer from 'ol/layer/VectorTile.js';
2
2
  import VectorTileSource from 'ol/source/VectorTile.js';
3
3
  import TileState from 'ol/TileState.js';
4
- import LayerOpenlayers from './layerOpenlayers.js';
4
+ import LayerOpenlayersImpl from './layerOpenlayersImpl.js';
5
5
  import { mercatorProjection } from '../../util/projection.js';
6
6
 
7
7
  /**
@@ -9,13 +9,13 @@ import { mercatorProjection } from '../../util/projection.js';
9
9
  * @class
10
10
  * @export
11
11
  * @implements {VectorTileImplementation}
12
- * @extends {LayerOpenlayers}
12
+ * @extends {LayerOpenlayersImpl}
13
13
  */
14
- class VectorTileOpenlayers extends LayerOpenlayers {
15
- static get className() { return 'vcs.vcm.layer.openlayers.VectorTileOpenlayers'; }
14
+ class VectorTileOpenlayersImpl extends LayerOpenlayersImpl {
15
+ static get className() { return 'VectorTileOpenlayersImpl'; }
16
16
 
17
17
  /**
18
- * @param {import("@vcmap/core").Openlayers} map
18
+ * @param {import("@vcmap/core").OpenlayersMap} map
19
19
  * @param {VectorTileImplementationOptions} options
20
20
  */
21
21
  constructor(map, options) {
@@ -174,4 +174,4 @@ class VectorTileOpenlayers extends LayerOpenlayers {
174
174
  }
175
175
  }
176
176
 
177
- export default VectorTileOpenlayers;
177
+ export default VectorTileOpenlayersImpl;