xy-cesium3 0.0.43 → 0.0.44

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/img/local.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xy-cesium3",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "description": "雄越cesium3",
5
5
  "main": "xy-cesium3.umd.js",
6
6
  "scripts": {
package/xy-cesium3.es.js CHANGED
@@ -2583,6 +2583,7 @@ function removeEntityLayer(viewer2, entity) {
2583
2583
  const defaultOptions$8 = {
2584
2584
  id: "point",
2585
2585
  data: [],
2586
+ show: true,
2586
2587
  image: {
2587
2588
  image: "/img/marker.png",
2588
2589
  width: 30,
@@ -2615,13 +2616,14 @@ const addEntityPoint = (viewer2, option) => {
2615
2616
  const labelStyle = opt.text || {};
2616
2617
  const data = opt.data || [];
2617
2618
  const props = opt.props || {};
2619
+ const show2 = opt.show === void 0 ? true : show2;
2618
2620
  const dataSource = new Cesium.CustomDataSource(opt.id);
2619
2621
  viewer2.dataSources.add(dataSource);
2620
2622
  data.forEach((item) => {
2621
2623
  if (item[props.lgtd] && item[props.lttd]) {
2622
2624
  var entity = new Cesium.Entity({
2623
2625
  name: item.id,
2624
- show: true,
2626
+ show: show2,
2625
2627
  position: Cesium.Cartesian3.fromDegrees(
2626
2628
  Number(item[props.lgtd]),
2627
2629
  Number(item[props.lttd]),
@@ -6171,6 +6173,7 @@ class FlowGradientMaterial extends Cesium.Material {
6171
6173
  const defaultOptions$5 = {
6172
6174
  id: "",
6173
6175
  data: [],
6176
+ show: true,
6174
6177
  line: {},
6175
6178
  text: {
6176
6179
  show: true
@@ -6187,6 +6190,7 @@ const addEntityLine = (viewer2, option) => {
6187
6190
  let props = opt.props || {};
6188
6191
  let data = opt.data || [];
6189
6192
  data = data.filter((item) => item[props.lglt]);
6193
+ const show2 = opt.show === void 0 ? true : show2;
6190
6194
  let dataSource = new Cesium.CustomDataSource(opt.id);
6191
6195
  viewer2.dataSources.add(dataSource);
6192
6196
  data.forEach((item) => {
@@ -6194,7 +6198,7 @@ const addEntityLine = (viewer2, option) => {
6194
6198
  let polylinePosition = Cesium.Cartesian3.fromDegreesArray(lglt);
6195
6199
  var entity = new Cesium.Entity({
6196
6200
  name: "line_" + item.id,
6197
- show: true,
6201
+ show: show2,
6198
6202
  polyline: Object.assign({
6199
6203
  positions: polylinePosition,
6200
6204
  width: lineStyle.width || 5,
@@ -6209,7 +6213,7 @@ const addEntityLine = (viewer2, option) => {
6209
6213
  const centerPoint = computePolyLineCenter(polylinePosition);
6210
6214
  let label = {
6211
6215
  name: "line_text_" + item.id,
6212
- show: true,
6216
+ show: show2,
6213
6217
  position: centerPoint,
6214
6218
  label: Object.assign({
6215
6219
  text: item[props.name],
@@ -6559,6 +6563,7 @@ const addPrimitiveRadar = (viewer2, option) => {
6559
6563
  const defaultOptions$2 = {
6560
6564
  id: "",
6561
6565
  data: [],
6566
+ show: true,
6562
6567
  polygon: {
6563
6568
  extrudedHeight: 0,
6564
6569
  outline: false,
@@ -6578,6 +6583,7 @@ const addEntityPolygon = (viewer2, option) => {
6578
6583
  let labelStyle = opt.text || {};
6579
6584
  let props = opt.props || {};
6580
6585
  let data = opt.data || [];
6586
+ const show2 = opt.show === void 0 ? true : show2;
6581
6587
  data = data.filter((item) => item[props.lglt]);
6582
6588
  let dataSource = new Cesium.CustomDataSource(opt.id);
6583
6589
  viewer2.dataSources.add(dataSource);
@@ -6590,6 +6596,7 @@ const addEntityPolygon = (viewer2, option) => {
6590
6596
  }
6591
6597
  if (!pStyle.extrudedHeight && pStyle.outline) {
6592
6598
  polyline = {
6599
+ show: show2,
6593
6600
  positions: Cesium.Cartesian3.fromDegreesArray(lglt),
6594
6601
  width: pStyle.outlineWidth,
6595
6602
  material: pStyle.outlineColor,
@@ -6601,7 +6608,7 @@ const addEntityPolygon = (viewer2, option) => {
6601
6608
  let polygonPositions = Cesium.Cartesian3.fromDegreesArray(lglt);
6602
6609
  var entity = new Cesium.Entity({
6603
6610
  name: "polygon_" + item.id,
6604
- show: true,
6611
+ show: show2,
6605
6612
  polygon: Object.assign({
6606
6613
  hierarchy: polygonPositions,
6607
6614
  material: Cesium.Color.RED,
@@ -6619,7 +6626,7 @@ const addEntityPolygon = (viewer2, option) => {
6619
6626
  const centerLat = Cesium.Math.toDegrees(centerCartographic.latitude);
6620
6627
  let label = {
6621
6628
  name: "polygon_text_" + item.id,
6622
- show: true,
6629
+ show: show2,
6623
6630
  position: Cesium.Cartesian3.fromDegrees(centerLon, centerLat, 0),
6624
6631
  label: Object.assign({
6625
6632
  text: item[props.name],