@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.cjs.development.js +8 -13
- package/dist/react.cjs.development.js.map +1 -1
- package/dist/react.cjs.production.min.js +1 -1
- package/dist/react.cjs.production.min.js.map +1 -1
- package/dist/react.esm.js +8 -13
- package/dist/react.esm.js.map +1 -1
- package/dist/symbols/mockFeatures.d.ts +4 -2
- package/dist/symbols/types.d.ts +2 -1
- package/package.json +5 -5
|
@@ -45,8 +45,9 @@ var StaticImageSymbol = require('@evergis/sgis/es/symbols/point/StaticImageSymbo
|
|
|
45
45
|
var Square = require('@evergis/sgis/es/symbols/point/Square');
|
|
46
46
|
var MaskedImage = require('@evergis/sgis/es/symbols/point/MaskedImage');
|
|
47
47
|
var H3Symbol = require('@evergis/sgis/es/symbols/H3Symbol');
|
|
48
|
-
var H3Feature = require('@evergis/sgis/es/features/H3Feature');
|
|
49
48
|
var CombinedPolylineSymbol = require('@evergis/sgis/es/symbols/CombinedPolylineSymbol');
|
|
49
|
+
var H3Feature = require('@evergis/sgis/es/features/H3Feature');
|
|
50
|
+
var CombinedPolyline = require('@evergis/sgis/es/features/CombinedPolyline');
|
|
50
51
|
var Canvas = require('@evergis/sgis/es/painters/DomPainter/Canvas');
|
|
51
52
|
var commonEvents = require('@evergis/sgis/es/commonEvents');
|
|
52
53
|
var ClusterLayer$1 = require('@evergis/sgis/es/layers/ClusterLayer');
|
|
@@ -1662,14 +1663,11 @@ let EvergisFeature = /*#__PURE__*/function () {
|
|
|
1662
1663
|
this.layerName = feature.layer;
|
|
1663
1664
|
this.layerAlias = feature.layer;
|
|
1664
1665
|
this.attributes = getFeatureAttributes(feature.attributes);
|
|
1665
|
-
console.info("EvergisFeature-0", this);
|
|
1666
1666
|
}
|
|
1667
1667
|
|
|
1668
1668
|
_createClass(EvergisFeature, [{
|
|
1669
1669
|
key: "sGisFeature",
|
|
1670
1670
|
value: function sGisFeature() {
|
|
1671
|
-
console.info("EvergisFeature-1", this);
|
|
1672
|
-
|
|
1673
1671
|
if (!this.geometry || !this.symbol) {
|
|
1674
1672
|
return null;
|
|
1675
1673
|
} // @ts-ignore
|
|
@@ -1681,7 +1679,6 @@ let EvergisFeature = /*#__PURE__*/function () {
|
|
|
1681
1679
|
sr
|
|
1682
1680
|
} = this.geometry;
|
|
1683
1681
|
const crs = CRS_MAP[sr];
|
|
1684
|
-
console.info("EvergisFeature-2", crs, type);
|
|
1685
1682
|
|
|
1686
1683
|
if (!crs) {
|
|
1687
1684
|
return null;
|
|
@@ -4159,7 +4156,7 @@ function isSGisH3Symbol(symbol) {
|
|
|
4159
4156
|
return symbol instanceof H3Symbol.H3Symbol;
|
|
4160
4157
|
}
|
|
4161
4158
|
function isSGisCombinedPolylineSymbol(symbol) {
|
|
4162
|
-
return symbol
|
|
4159
|
+
return symbol instanceof CombinedPolylineSymbol.CombinedPolylineSymbol;
|
|
4163
4160
|
}
|
|
4164
4161
|
function isSGisClusterSymbol(symbol) {
|
|
4165
4162
|
return !!symbol.singleObjectSymbol;
|
|
@@ -4177,6 +4174,9 @@ const pointFeature = /*#__PURE__*/new PointFeature.PointFeature([50, -50], {
|
|
|
4177
4174
|
const lineFeature = /*#__PURE__*/new Polyline.Polyline([[0, -57], [26, -57], [40, -35], [60, -65], [74, -43], [100, -43]], {
|
|
4178
4175
|
crs: Crs.plain
|
|
4179
4176
|
});
|
|
4177
|
+
const combinedLineFeature = /*#__PURE__*/new CombinedPolyline.CombinedPolyline([[0, -57], [26, -57], [40, -35], [60, -65], [74, -43], [100, -43]], {
|
|
4178
|
+
crs: Crs.plain
|
|
4179
|
+
});
|
|
4180
4180
|
const polygonFeature = /*#__PURE__*/new Polygon.Polygon([[20, -20], [80, -20], [80, -80], [20, -80]], {
|
|
4181
4181
|
crs: Crs.plain
|
|
4182
4182
|
});
|
|
@@ -4198,14 +4198,14 @@ const MAP_LEGEND_FEATURES = {
|
|
|
4198
4198
|
const LEGEND_FEATURES = {
|
|
4199
4199
|
point: pointFeature,
|
|
4200
4200
|
polyline: lineLegendFeature,
|
|
4201
|
-
combinedPolyline:
|
|
4201
|
+
combinedPolyline: combinedLineFeature,
|
|
4202
4202
|
polygon: polygonLegendFeature,
|
|
4203
4203
|
h3grid: h3gridFeature
|
|
4204
4204
|
};
|
|
4205
4205
|
const MOCK_FEATURES = {
|
|
4206
4206
|
point: pointFeature,
|
|
4207
4207
|
polyline: lineFeature,
|
|
4208
|
-
combinedPolyline:
|
|
4208
|
+
combinedPolyline: combinedLineFeature,
|
|
4209
4209
|
polygon: polygonFeature,
|
|
4210
4210
|
h3grid: h3gridFeature
|
|
4211
4211
|
};
|
|
@@ -4235,8 +4235,6 @@ function getSymbolRenders(symbol, size, features) {
|
|
|
4235
4235
|
return symbol.renderFunctionAsync(featuresToRender.h3grid, resolution, Crs.plain);
|
|
4236
4236
|
}
|
|
4237
4237
|
|
|
4238
|
-
console.info("symbol", symbol, symbol instanceof CombinedPolylineSymbol.CombinedPolylineSymbol, isSGisCombinedPolylineSymbol(symbol));
|
|
4239
|
-
|
|
4240
4238
|
if (isSGisCombinedPolylineSymbol(symbol)) {
|
|
4241
4239
|
return symbol.renderFunctionAsync(featuresToRender.combinedPolyline, resolution, Crs.plain);
|
|
4242
4240
|
}
|
|
@@ -4248,7 +4246,6 @@ const getMapLegendSymbolRenders = function getMapLegendSymbolRenders(symbol, siz
|
|
|
4248
4246
|
size = viewBoxSize;
|
|
4249
4247
|
}
|
|
4250
4248
|
|
|
4251
|
-
console.info("getMapLegendSymbolRenders", symbol);
|
|
4252
4249
|
return getSymbolRenders(symbol, size, MAP_LEGEND_FEATURES);
|
|
4253
4250
|
};
|
|
4254
4251
|
const getLegendSymbolRenders = function getLegendSymbolRenders(symbol, size) {
|
|
@@ -4256,7 +4253,6 @@ const getLegendSymbolRenders = function getLegendSymbolRenders(symbol, size) {
|
|
|
4256
4253
|
size = viewBoxSize;
|
|
4257
4254
|
}
|
|
4258
4255
|
|
|
4259
|
-
console.info("getLegendSymbolRenders", symbol);
|
|
4260
4256
|
return getSymbolRenders(symbol, size, LEGEND_FEATURES);
|
|
4261
4257
|
};
|
|
4262
4258
|
|
|
@@ -4477,7 +4473,6 @@ function useSymbol(_ref, canvasRef) {
|
|
|
4477
4473
|
if (canvasRef.current !== null && symbol !== undefined) {
|
|
4478
4474
|
const canvas = canvasRef.current;
|
|
4479
4475
|
setCanvasSize(canvas, size, maxWidth);
|
|
4480
|
-
console.info("useSymbol", symbol, size, render);
|
|
4481
4476
|
render(symbol, size).then(renders => {
|
|
4482
4477
|
renderSymbolToCanvas(renders, canvas);
|
|
4483
4478
|
});
|