hn-map 1.1.9 → 1.1.10

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/index.js CHANGED
@@ -933,7 +933,6 @@
933
933
  value: function updateMapParams(e) {
934
934
  this.level = this.map.getZoom();
935
935
  var viewPos = this.getExtent();
936
- console.log("当前缩放级别level:", this.level);
937
936
  if (this.level !== this.option.level) {
938
937
  this.layerList.forEach(function (layer) {
939
938
  layer.children.forEach(function (entity) {
@@ -1055,12 +1054,10 @@
1055
1054
  key: "removeEntity",
1056
1055
  value: function removeEntity(entityParam) {
1057
1056
  var entity = this.getEntity(entityParam);
1058
- console.log("removeEntity", entity);
1059
1057
  if (entity) {
1060
1058
  this.children = this.children.filter(function (v) {
1061
1059
  return v.id !== entity.id;
1062
1060
  });
1063
- console.log("layerEntity", this.layerEntity);
1064
1061
  if (entity.type === "pointCloud" || entity.type === "heatMap") {
1065
1062
  alert(entity.id);
1066
1063
  hnMap.map.map.removeLayer(entity.id);
@@ -1338,7 +1335,6 @@
1338
1335
  }, {
1339
1336
  key: "updateEntity",
1340
1337
  value: function updateEntity(entity, viewPos) {
1341
- console.log("updateEntity", entity, viewPos);
1342
1338
  var isUpdateEntity = hnMap.map.level >= Number(entity.option.distanceDisplayCondition_far) && hnMap.map.level <= Number(entity.option.distanceDisplayCondition_near);
1343
1339
  if (isUpdateEntity) {
1344
1340
  if (!entity.show && this.isIncludesLabel(entity.option.position, viewPos)) {
@@ -1393,7 +1389,6 @@
1393
1389
  key: "addLevelEntity",
1394
1390
  value: function addLevelEntity(entity) {
1395
1391
  if (entity.type == "imagePoint") {
1396
- console.log("addLevelEntity=====", entity);
1397
1392
  hnMap.map.map.loadImage(entity.option.image, function (error, image) {
1398
1393
  entity.config.layout["icon-size"] = entity.option.width / image.width;
1399
1394
  entity.config.layout["icon-offset"] = [entity.option.offset[0] / entity.config.layout["icon-size"], entity.option.offset[1] / entity.config.layout["icon-size"]];
@@ -1477,7 +1472,6 @@
1477
1472
  value: function moveEntity(layerIds) {
1478
1473
  // 数组转字符串
1479
1474
  var s = layerIds.join(",");
1480
- console.log("s===", s);
1481
1475
  hnMap.map.map.moveLayer(s);
1482
1476
  }
1483
1477
  }, {
@@ -1519,7 +1513,6 @@
1519
1513
  content += "<div>".concat(key, ": ").concat(data[key], "</div>");
1520
1514
  }
1521
1515
  _this8.infoWindow.setHTML(content);
1522
- console.log("e.lngLat===", e.lngLat);
1523
1516
  _this8.infoWindow.setLngLat(e.lngLat).addTo(hnMap.map.map);
1524
1517
  };
1525
1518
  hnMap.map.map.on("click", this.config.id, handleClick);
@@ -1622,7 +1615,6 @@
1622
1615
  }, {
1623
1616
  key: "destroy",
1624
1617
  value: function destroy() {
1625
- console.log(this.graphic, "=====this.graphic===");
1626
1618
  this.graphic.destroy();
1627
1619
  }
1628
1620
  }, {
@@ -1791,7 +1783,6 @@
1791
1783
  value: function flyTo() {
1792
1784
  var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1793
1785
  deepMerge(this.option, option);
1794
- console.log(this.option, "=====flyTo");
1795
1786
  var zoom = this.hnMap.map.map.getZoom();
1796
1787
  var center;
1797
1788
  if (this.option.center) {
@@ -2049,7 +2040,6 @@
2049
2040
  }, {
2050
2041
  key: "set",
2051
2042
  value: function set(option) {
2052
- console.log("=====set point====", option);
2053
2043
  deepMerge(this.option, option);
2054
2044
  this.config = this.formatConfig(this.option);
2055
2045
  var mySource = hnMap.map.map.getSource(this.config.id);
@@ -2578,10 +2568,7 @@
2578
2568
  value: function set(option) {
2579
2569
  deepMerge(this.option, option);
2580
2570
  this.config = this.formatConfig(this.option);
2581
- console.log(this.config, "======CONFIG=====");
2582
- console.log(this.option, "=========OPTION");
2583
2571
  var mySource = hnMap.map.map.getSource(this.config.id);
2584
- console.log(mySource, "=========SOURCE");
2585
2572
  mySource.setData({
2586
2573
  type: "FeatureCollection",
2587
2574
  features: [{
@@ -3228,7 +3215,6 @@
3228
3215
  // if(option.height){
3229
3216
  // config.scale = this.calculateScaleFromHeight(this.graphic, option.height)
3230
3217
  // }
3231
- // console.log(config)
3232
3218
  // this.graphic.flyTo(config);
3233
3219
  // }
3234
3220
  }, {
@@ -5271,7 +5257,6 @@
5271
5257
  var modelOrigin = convertPosition([option.position.lng, option.position.lat]);
5272
5258
  var modelAltitude = option.position.alt;
5273
5259
  var modelRotate = this.calculateRotationFromDegrees(option.rotation);
5274
- console.log("modelRotate", modelRotate);
5275
5260
  var modelScale = option.scale * 1e-6;
5276
5261
  var modelTransform = {
5277
5262
  translateX: SGMap.MercatorCoordinate.fromLngLat(modelOrigin, modelAltitude).x,
@@ -5289,7 +5274,6 @@
5289
5274
  type: "custom",
5290
5275
  renderingMode: "3d",
5291
5276
  onAdd: function onAdd(map, gl) {
5292
- console.log("map====", map);
5293
5277
  this.camera = new THREE.Camera();
5294
5278
  this.scene = new THREE.Scene();
5295
5279
  var directionalLight = new THREE.DirectionalLight(0xffffff);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hn-map",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "hn-map集成mars3d、高德、思极",
5
5
  "main": "dist/index.js",
6
6
  "author": "庞大仙",
@@ -39,7 +39,6 @@ export default class mars3d_entity {
39
39
  }
40
40
 
41
41
  destroy() {
42
- console.log(this.graphic, "=====this.graphic===");
43
42
  this.graphic.destroy();
44
43
  }
45
44
 
@@ -69,7 +69,6 @@ export default class siji_entity {
69
69
 
70
70
  flyTo(option: any = {}) {
71
71
  deepMerge(this.option, option);
72
- console.log(this.option, "=====flyTo");
73
72
  let zoom = this.hnMap.map.map.getZoom();
74
73
  let center;
75
74
  if (this.option.center) {
@@ -214,10 +214,7 @@ export default (hnMap: any) => {
214
214
  set(option: any) {
215
215
  deepMerge(this.option, option);
216
216
  this.config = this.formatConfig(this.option);
217
- console.log(this.config, "======CONFIG=====");
218
- console.log(this.option, "=========OPTION");
219
217
  let mySource = hnMap.map.map.getSource(this.config.id);
220
- console.log(mySource, "=========SOURCE");
221
218
  mySource.setData({
222
219
  type: "FeatureCollection",
223
220
  features: [
@@ -143,7 +143,6 @@ export default (hnMap: any) => {
143
143
  // if(option.height){
144
144
  // config.scale = this.calculateScaleFromHeight(this.graphic, option.height)
145
145
  // }
146
- // console.log(config)
147
146
  // this.graphic.flyTo(config);
148
147
  // }
149
148
 
@@ -209,7 +209,6 @@ export default (hnMap: any) => {
209
209
  return [pixelOffset[0] / textSizePx, pixelOffset[1] / textSizePx];
210
210
  }
211
211
  set(option: any) {
212
- console.log("=====set point====", option);
213
212
  deepMerge(this.option, option);
214
213
  this.config = this.formatConfig(this.option);
215
214
  let mySource = hnMap.map.map.getSource(this.config.id);
@@ -46,12 +46,10 @@ export default (hnMap: any) => {
46
46
 
47
47
  removeEntity(entityParam: any) {
48
48
  const entity = this.getEntity(entityParam);
49
- console.log("removeEntity", entity);
50
49
  if (entity) {
51
50
  this.children = this.children.filter((v: any) => {
52
51
  return v.id !== entity.id;
53
52
  });
54
- console.log("layerEntity", this.layerEntity);
55
53
  if (entity.type === "pointCloud" || entity.type === "heatMap") {
56
54
  alert(entity.id);
57
55
  hnMap.map.map.removeLayer(entity.id);
@@ -290,7 +288,6 @@ export default (hnMap: any) => {
290
288
  }
291
289
 
292
290
  updateEntity(entity: any, viewPos: any) {
293
- console.log("updateEntity", entity, viewPos);
294
291
  const isUpdateEntity =
295
292
  hnMap.map.level >= Number(entity.option.distanceDisplayCondition_far) &&
296
293
  hnMap.map.level <= Number(entity.option.distanceDisplayCondition_near);
@@ -350,7 +347,6 @@ export default (hnMap: any) => {
350
347
 
351
348
  addLevelEntity(entity: any) {
352
349
  if (entity.type == "imagePoint") {
353
- console.log("addLevelEntity=====", entity);
354
350
  hnMap.map.map.loadImage(
355
351
  entity.option.image,
356
352
  function (error: any, image: any) {
@@ -443,7 +439,6 @@ export default (hnMap: any) => {
443
439
  moveEntity(layerIds: Array<string>) {
444
440
  // 数组转字符串
445
441
  let s = layerIds.join(",");
446
- console.log("s===", s);
447
442
  hnMap.map.map.moveLayer(s);
448
443
  }
449
444
  clearEntity() {
@@ -479,7 +474,6 @@ export default (hnMap: any) => {
479
474
  }
480
475
 
481
476
  this.infoWindow.setHTML(content);
482
- console.log("e.lngLat===", e.lngLat);
483
477
  this.infoWindow.setLngLat(e.lngLat).addTo(hnMap.map.map);
484
478
  };
485
479
 
@@ -104,7 +104,6 @@ export default (hnMap: any) => {
104
104
  ]);
105
105
  var modelAltitude = option.position.alt;
106
106
  var modelRotate = this.calculateRotationFromDegrees(option.rotation);
107
- console.log("modelRotate", modelRotate);
108
107
  var modelScale = option.scale * (1e-6);
109
108
 
110
109
  var modelTransform = {
@@ -134,7 +133,6 @@ export default (hnMap: any) => {
134
133
  type: "custom",
135
134
  renderingMode: "3d",
136
135
  onAdd: function (map: any, gl: any) {
137
- console.log("map====", map);
138
136
  this.camera = new THREE.Camera();
139
137
  this.scene = new THREE.Scene();
140
138
 
package/src/map.ts CHANGED
@@ -447,7 +447,6 @@ export default (hnMap: any) => {
447
447
  private updateMapParams(e: any) {
448
448
  this.level = this.map.getZoom();
449
449
  let viewPos = this.getExtent();
450
- console.log("当前缩放级别level:", this.level);
451
450
  if (this.level !== this.option.level) {
452
451
  this.layerList.forEach((layer: any) => {
453
452
  layer.children.forEach((entity: any) => {