@evergis/react 2.0.178 → 2.0.180

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/react.esm.js CHANGED
@@ -38,8 +38,9 @@ import { StaticImageSymbol } from '@evergis/sgis/es/symbols/point/StaticImageSym
38
38
  import { SquareSymbol } from '@evergis/sgis/es/symbols/point/Square';
39
39
  import { MaskedImage } from '@evergis/sgis/es/symbols/point/MaskedImage';
40
40
  import { H3Symbol } from '@evergis/sgis/es/symbols/H3Symbol';
41
- import { H3Feature } from '@evergis/sgis/es/features/H3Feature';
42
41
  import { CombinedPolylineSymbol } from '@evergis/sgis/es/symbols/CombinedPolylineSymbol';
42
+ import { H3Feature } from '@evergis/sgis/es/features/H3Feature';
43
+ import { CombinedPolyline } from '@evergis/sgis/es/features/CombinedPolyline';
43
44
  import { Canvas } from '@evergis/sgis/es/painters/DomPainter/Canvas';
44
45
  import { sGisClickEvent } from '@evergis/sgis/es/commonEvents';
45
46
  import { ClusterLayer as ClusterLayer$1 } from '@evergis/sgis/es/layers/ClusterLayer';
@@ -1661,14 +1662,11 @@ let EvergisFeature = /*#__PURE__*/function () {
1661
1662
  this.layerName = feature.layer;
1662
1663
  this.layerAlias = feature.layer;
1663
1664
  this.attributes = getFeatureAttributes(feature.attributes);
1664
- console.info("EvergisFeature-0", this);
1665
1665
  }
1666
1666
 
1667
1667
  _createClass(EvergisFeature, [{
1668
1668
  key: "sGisFeature",
1669
1669
  value: function sGisFeature() {
1670
- console.info("EvergisFeature-1", this);
1671
-
1672
1670
  if (!this.geometry || !this.symbol) {
1673
1671
  return null;
1674
1672
  } // @ts-ignore
@@ -1680,7 +1678,6 @@ let EvergisFeature = /*#__PURE__*/function () {
1680
1678
  sr
1681
1679
  } = this.geometry;
1682
1680
  const crs = CRS_MAP[sr];
1683
- console.info("EvergisFeature-2", crs, type);
1684
1681
 
1685
1682
  if (!crs) {
1686
1683
  return null;
@@ -4164,7 +4161,7 @@ function isSGisH3Symbol(symbol) {
4164
4161
  return symbol instanceof H3Symbol;
4165
4162
  }
4166
4163
  function isSGisCombinedPolylineSymbol(symbol) {
4167
- return symbol.type === "combinedPolylineSymbol";
4164
+ return symbol instanceof CombinedPolylineSymbol;
4168
4165
  }
4169
4166
  function isSGisClusterSymbol(symbol) {
4170
4167
  return !!symbol.singleObjectSymbol;
@@ -4182,6 +4179,9 @@ const pointFeature = /*#__PURE__*/new PointFeature([50, -50], {
4182
4179
  const lineFeature = /*#__PURE__*/new Polyline([[0, -57], [26, -57], [40, -35], [60, -65], [74, -43], [100, -43]], {
4183
4180
  crs: plain
4184
4181
  });
4182
+ const combinedLineFeature = /*#__PURE__*/new CombinedPolyline([[0, -57], [26, -57], [40, -35], [60, -65], [74, -43], [100, -43]], {
4183
+ crs: plain
4184
+ });
4185
4185
  const polygonFeature = /*#__PURE__*/new Polygon([[20, -20], [80, -20], [80, -80], [20, -80]], {
4186
4186
  crs: plain
4187
4187
  });
@@ -4203,14 +4203,14 @@ const MAP_LEGEND_FEATURES = {
4203
4203
  const LEGEND_FEATURES = {
4204
4204
  point: pointFeature,
4205
4205
  polyline: lineLegendFeature,
4206
- combinedPolyline: lineLegendFeature,
4206
+ combinedPolyline: combinedLineFeature,
4207
4207
  polygon: polygonLegendFeature,
4208
4208
  h3grid: h3gridFeature
4209
4209
  };
4210
4210
  const MOCK_FEATURES = {
4211
4211
  point: pointFeature,
4212
4212
  polyline: lineFeature,
4213
- combinedPolyline: lineFeature,
4213
+ combinedPolyline: combinedLineFeature,
4214
4214
  polygon: polygonFeature,
4215
4215
  h3grid: h3gridFeature
4216
4216
  };
@@ -4240,8 +4240,6 @@ function getSymbolRenders(symbol, size, features) {
4240
4240
  return symbol.renderFunctionAsync(featuresToRender.h3grid, resolution, plain);
4241
4241
  }
4242
4242
 
4243
- console.info("symbol", symbol, symbol instanceof CombinedPolylineSymbol, isSGisCombinedPolylineSymbol(symbol));
4244
-
4245
4243
  if (isSGisCombinedPolylineSymbol(symbol)) {
4246
4244
  return symbol.renderFunctionAsync(featuresToRender.combinedPolyline, resolution, plain);
4247
4245
  }
@@ -4253,7 +4251,6 @@ const getMapLegendSymbolRenders = function getMapLegendSymbolRenders(symbol, siz
4253
4251
  size = viewBoxSize;
4254
4252
  }
4255
4253
 
4256
- console.info("getMapLegendSymbolRenders", symbol);
4257
4254
  return getSymbolRenders(symbol, size, MAP_LEGEND_FEATURES);
4258
4255
  };
4259
4256
  const getLegendSymbolRenders = function getLegendSymbolRenders(symbol, size) {
@@ -4261,7 +4258,6 @@ const getLegendSymbolRenders = function getLegendSymbolRenders(symbol, size) {
4261
4258
  size = viewBoxSize;
4262
4259
  }
4263
4260
 
4264
- console.info("getLegendSymbolRenders", symbol);
4265
4261
  return getSymbolRenders(symbol, size, LEGEND_FEATURES);
4266
4262
  };
4267
4263
 
@@ -4482,7 +4478,6 @@ function useSymbol(_ref, canvasRef) {
4482
4478
  if (canvasRef.current !== null && symbol !== undefined) {
4483
4479
  const canvas = canvasRef.current;
4484
4480
  setCanvasSize(canvas, size, maxWidth);
4485
- console.info("useSymbol", symbol, size, render);
4486
4481
  render(symbol, size).then(renders => {
4487
4482
  renderSymbolToCanvas(renders, canvas);
4488
4483
  });