gis-map-universal 0.1.0 → 0.1.1

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 (2) hide show
  1. package/gismap.umd.js +65 -51
  2. package/package.json +1 -1
package/gismap.umd.js CHANGED
@@ -457215,7 +457215,7 @@ var Cluster_Cluster = /** @class */ (function (_super) {
457215
457215
  feature.setStyle(
457216
457216
  new Style["default"]({
457217
457217
  image: new Icon["default"]({
457218
- src: __webpack_require__("aad3"),
457218
+ src: data.iconUrl,//require("../img/event.png"),
457219
457219
  anchor: [1, 1],
457220
457220
  scale: 0.6,
457221
457221
  }),
@@ -457486,59 +457486,73 @@ var srcvue_type_template_id_2c9643d7_scoped_true_staticRenderFns = [function (){
457486
457486
  hpr
457487
457487
  );
457488
457488
 
457489
- // const entity = window.viewer.entities.add({
457490
- // name: url,
457491
- // position: position,
457492
- // orientation: orientation,
457493
- // model: {
457494
- // uri: url,
457495
- // minimumPixelSize: 128,
457496
- // maximumScale: 20000,
457497
- // // clippingPlanes: new Cesium.ClippingPlaneCollection({
457498
- // // planes: [
457499
- // // new Cesium.ClippingPlane(
457500
- // // new Cesium.Cartesian3(0, 0, 1),
457501
- // // 0
457502
- // // ),
457503
- // // ],
457504
- // // edgeWidth: 1,
457505
- // // edgeColor: Cesium.Color.RED,
457506
- // // enabled: true,
457507
- // // edgeMaterial: new Cesium.PolylineOutlineMaterialProperty({
457508
- // // color: Cesium.Color.RED,
457509
- // // outlineWidth: 1,
457510
- // // outlineColor: Cesium.Color.BLACK,
457511
- // // }),
457512
- // // }),
457513
- // },
457514
- // });
457515
- // window.viewer.trackedEntity = entity;
457516
- var initialScale = new Cesium.Matrix4.fromScale(
457517
- new Cesium.Cartesian3(0.01, 0.01, 0.01)
457518
- ); // 示例缩放因子
457519
- var modelMatrix = Cesium.Matrix4.multiply(
457520
- Cesium.Transforms.eastNorthUpToFixedFrame(position),
457521
- initialScale,
457522
- new Cesium.Matrix4()
457523
- );
457524
- const model = window.viewer.scene.primitives.add(
457525
- Cesium.Model.fromGltf({
457526
- url: url,
457527
- show: true,
457528
- modelMatrix: Cesium.Transforms.eastNorthUpToFixedFrame(position),
457529
- scale: 1.0,
457489
+ const entity = window.viewer.entities.add({
457490
+ name: url,
457491
+ position: position,
457492
+ orientation: orientation,
457493
+ model: {
457494
+ uri: url,
457530
457495
  minimumPixelSize: 128,
457531
457496
  maximumScale: 20000,
457532
- allowPicking: false,
457533
- debugShowBoundingVolume: false,
457534
- debugWireframe: false,
457535
- id: "myModel",
457536
- })
457537
- );
457538
- model.readyPromise.then(function (model) {
457539
- model.activeAnimations.addAll();
457497
+ // clippingPlanes: new Cesium.ClippingPlaneCollection({
457498
+ // planes: [
457499
+ // new Cesium.ClippingPlane(new Cesium.Cartesian3(0, 0, 1), 0),
457500
+ // ],
457501
+ // edgeWidth: 1,
457502
+ // edgeColor: Cesium.Color.RED,
457503
+ // enabled: true,
457504
+ // edgeMaterial: new Cesium.PolylineOutlineMaterialProperty({
457505
+ // color: Cesium.Color.RED,
457506
+ // outlineWidth: 1,
457507
+ // outlineColor: Cesium.Color.BLACK,
457508
+ // }),
457509
+ // }),
457510
+ },
457540
457511
  });
457541
- console.log(window.viewer.scene.primitives);
457512
+ // window.viewer.trackedEntity = entity;
457513
+ // var initialScale = new Cesium.Matrix4.fromScale(
457514
+ // new Cesium.Cartesian3(0.01, 0.01, 0.01)
457515
+ // ); // 示例缩放因子
457516
+ // var modelMatrix = Cesium.Matrix4.multiply(
457517
+ // Cesium.Transforms.eastNorthUpToFixedFrame(position),
457518
+ // initialScale,
457519
+ // new Cesium.Matrix4()
457520
+ // );
457521
+ // const model = window.viewer.scene.primitives.add(
457522
+ // Cesium.Model.fromGltf({
457523
+ // url: url,
457524
+ // show: true,
457525
+ // modelMatrix: Cesium.Transforms.eastNorthUpToFixedFrame(position),
457526
+ // scale: 1.0,
457527
+ // minimumPixelSize: 128,
457528
+ // maximumScale: 20000,
457529
+ // allowPicking: false,
457530
+ // debugShowBoundingVolume: false,
457531
+ // debugWireframe: false,
457532
+ // id: "myModel",
457533
+ // })
457534
+ // );
457535
+ // model.readyPromise.then(function (model) {
457536
+ // model.activeAnimations.addAll();
457537
+ // });
457538
+ // console.log(window.viewer.scene.primitives);
457539
+
457540
+ window.viewer.screenSpaceEventHandler.setInputAction(function(click) {
457541
+ debugger
457542
+ // 使用场景的pick方法获取点击的实体
457543
+ var pickedObject = viewer.scene.pick(click.position);
457544
+ console.log(pickedObject);
457545
+ if (Cesium.defined(pickedObject) && pickedObject.node) {
457546
+ // 如果点击的是模型,获取模型的信息
457547
+ var model = pickedObject.node.model;
457548
+ if (model instanceof Cesium.Model) {
457549
+ // 这里可以获取模型的属性、原始数据等
457550
+ var attributes = model.attributes;
457551
+ // 例如,打印模型的名字
457552
+ console.log(model.name);
457553
+ }
457554
+ }
457555
+ }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
457542
457556
  },
457543
457557
  },
457544
457558
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gis-map-universal",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "GIS通用组件",
5
5
  "main": "gismap.umd.js",
6
6
  "private": false,