@eturnity/eturnity_3d 7.16.0-EPDM-9856.2 → 7.16.0-qa-dev03.0

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/.env CHANGED
@@ -1,2 +1 @@
1
- VUE_APP_GOOGLE_MAP_API_KEY={{API_KEY_FOR_LOCAL_DEVELOPMENT}}
2
- VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY={{API_KEY_FOR_LOCAL_DEVELOPMENT}}
1
+ VUE_APP_GOOGLE_MAP_API_KEY=AIzaSyAxqgQ_iRKAQ6AMvZ0a6Z0vkBwYTM-pnHM
@@ -22,7 +22,6 @@ definitions:
22
22
  script:
23
23
  - ./.bitbucket/ci/build_image_config.sh
24
24
  - export $(cat .env.image | xargs)
25
- - ./.bitbucket/ci/build_customization_config.sh
26
25
  - echo "{\"version\":\"${BB_ETURNITY_VERSION}\",\"full_version\":\"${TAG}\"}" > ./src/assets/version.json
27
26
  - docker build -t $IMAGE_NAME .
28
27
  - docker login --username $BB_PIPELINE_REGISTRY_TOKEN --password $BB_PIPELINE_REGISTRY_TOKEN $BB_CONTAINER_REGISTRY
@@ -66,7 +65,6 @@ definitions:
66
65
  script:
67
66
  - ./.bitbucket/ci/build_image_config.sh
68
67
  - export $(cat .env.image | xargs)
69
- - ./.bitbucket/ci/build_customization_config.sh
70
68
  - echo "{\"version\":\"${BB_ETURNITY_VERSION}\",\"full_version\":\"${TAG}\"}" > ./src/assets/version.json
71
69
  - export RELEASE_TAG=latest
72
70
  - export RELEASE_IMAGE_NAME=$BB_CONTAINER_REGISTRY/$BB_ETURNITY_HUB/$APPLICATION_NAME:$RELEASE_TAG
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_3d",
3
3
  "private": false,
4
- "version": "7.16.0-EPDM-9856.2",
4
+ "version": "7.16.0-qa-dev03.0",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
7
7
  "dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
@@ -10,7 +10,7 @@
10
10
  "prettier": "prettier --write \"**/*.{js,vue}\""
11
11
  },
12
12
  "dependencies": {
13
- "@eturnity/eturnity_maths": "7.10.0",
13
+ "@eturnity/eturnity_maths": "7.16.0-qa-dev03.0",
14
14
  "core-js": "^2.6.12",
15
15
  "cors": "^2.8.5",
16
16
  "earcut": "^2.2.4",
@@ -41,9 +41,9 @@
41
41
  "eslint-plugin-prettier": "3.4.1",
42
42
  "eslint-plugin-vue": "5.2.3",
43
43
  "html-webpack-plugin": "^3.2.0",
44
+ "prettier": "2.8.4",
44
45
  "webpack": "^4.46.0",
45
- "webpack-cli": "^4.10.0",
46
- "prettier": "2.8.4"
46
+ "webpack-cli": "^4.10.0"
47
47
  },
48
48
  "eslintConfig": {
49
49
  "root": true,
@@ -13,42 +13,80 @@ export function UpdateRoofModuleFieldRelations(state) {
13
13
  const panelPolygons = state.polygons.filter((poly) =>
14
14
  ['panel', 'user_deactivated_panel'].includes(poly.layer)
15
15
  )
16
+ panelPolygons.forEach((panel) => {
17
+ panel.roof = null
18
+ })
16
19
  //let's remove all moduleFields from roofs
20
+
17
21
  roofPolygons.forEach((roofPolygon) => {
18
- //breaking circular reference for memory management
19
- for (let k in roofPolygon.moduleFields) {
20
- roofPolygon.moduleFields[k] = null
22
+ if (!roofPolygon.moduleFields) {
23
+ roofPolygon.moduleFields = []
21
24
  }
22
- roofPolygon.moduleFields = []
25
+ roofPolygon.moduleFields.filter((mf) => {
26
+ moduleFieldPolygons.some((p) => p.id == mf.id)
27
+ })
23
28
  })
24
29
  moduleFieldPolygons.forEach((moduleFieldPolygon) => {
25
- moduleFieldPolygon.roof = null
26
- })
27
- panelPolygons.forEach((panelPolygon) => {
28
- panelPolygon.roof = null
30
+ if (
31
+ moduleFieldPolygon.roof &&
32
+ !roofPolygons.some((r) => r.id == moduleFieldPolygon.roof.id)
33
+ ) {
34
+ moduleFieldPolygon.roof = null
35
+ }
29
36
  })
30
37
 
31
38
  for (let k in moduleFieldPolygons) {
32
39
  const moduleField = moduleFieldPolygons[k]
33
- //check if everypoint is in the same roof and if they are not too far from the flat surface.(at least above)
34
- let roofPolygonCandidates = roofPolygons.filter((roof) => {
35
- const intersection = intersectOutlines(moduleField.outline, roof.outline)
36
- if (intersection.length == 0) return false
37
- const intersectionArea = calculateArea(intersection[0])
38
- return intersectionArea > 100 && moduleField.area <= roof.area + 0.1
39
- })
40
- //roofs on roof can lead to multiple roof under a point. moduleField is on the smallest
41
- let smallestRoof = null
42
- for (let roof of roofPolygonCandidates) {
43
- if (!smallestRoof || smallestRoof.area > roof.area) {
44
- smallestRoof = roof
45
- }
46
- }
47
- let roofPolygon = smallestRoof
40
+ let roofPolygon = moduleField.roof
48
41
  if (!roofPolygon) {
49
- continue
42
+ //check if everypoint is in the same roof and if they are not too far from the flat surface.(at least above)
43
+ let roofPolygonCandidates = roofPolygons.map((roof) => {
44
+ const intersection = intersectOutlines(
45
+ moduleField.outline,
46
+ roof.outline
47
+ )
48
+ if (intersection.length == 0) {
49
+ return {
50
+ roof,
51
+ intersectionArea: 0,
52
+ intersectionRatio: 0,
53
+ areaRatio: 0,
54
+ roofBiggerThanModuleField: 1
55
+ }
56
+ }
57
+ const intersectionArea_m2 = calculateArea(intersection[0]) / 1e6
58
+ return {
59
+ roof,
60
+ intersectionArea: intersectionArea_m2,
61
+ intersectionRatio: (intersectionArea_m2 / roof.area).toFixed(3),
62
+ areaRatio: (moduleField.area / roof.area).toFixed(3),
63
+ roofBiggerThanModuleField: roof.area >= moduleField.area ? 1 : -1
64
+ }
65
+ })
66
+ //roofs on roof can lead to multiple roof under a point. moduleField is on the smallest
67
+
68
+ roofPolygonCandidates
69
+ .sort((a, b) => b.roof.area - a.roof.area)
70
+ .sort((a, b) => a.intersectionArea - b.intersectionArea)
71
+ .sort(
72
+ (a, b) => a.roofBiggerThanModuleField - b.roofBiggerThanModuleField
73
+ )
74
+ let polygonCandidate = roofPolygonCandidates.pop()
75
+ if (!polygonCandidate) {
76
+ continue
77
+ }
78
+ roofPolygon = polygonCandidate.roof
79
+ if (!roofPolygon) {
80
+ continue
81
+ }
82
+
83
+ roofPolygon.moduleFields.push(moduleField)
50
84
  }
51
- roofPolygon.moduleFields.push(moduleField)
85
+ roofPolygon = roofPolygons.find((r) => r.id == roofPolygon.id)
86
+ roofPolygon.moduleFields = [
87
+ ...roofPolygon.moduleFields.filter((mf) => mf.id != moduleField.id),
88
+ moduleField
89
+ ]
52
90
  moduleField.roof = roofPolygon
53
91
  moduleField.panels.forEach((panel) => (panel.roof = roofPolygon))
54
92
  panelPolygons.forEach((p) => {
@@ -72,7 +110,9 @@ export function UpdateRoofModuleFieldRelations(state) {
72
110
  return panelPolygons.find((panel) => panel.id == p.id)
73
111
  })
74
112
  state = { ...state, polygons: newPolygons }
113
+
75
114
  state = removeModuleFieldAndPanelsOnNoOrMultipleRoofs(state)
115
+
76
116
  return state
77
117
  }
78
118
 
@@ -26,8 +26,7 @@ export class CustomProvider extends MapProvider {
26
26
  resolve(this.defaultImage)
27
27
  } else if (zoom > maxZoomLayer) {
28
28
  } else {
29
- const image = document.createElement('img')
30
-
29
+ var image = document.createElement('img')
31
30
  image.onload = function () {
32
31
  image.style.backgroundColor = 'red'
33
32
  resolve(image)
@@ -51,17 +50,6 @@ export class CustomProvider extends MapProvider {
51
50
  const yMax = yMin + resolution_mPerTile
52
51
 
53
52
  imageSrc += `&service=WMS&request=GetMap&layers=rgb&styles=&format=image%2Fjpeg&transparent=false&version=1.1.1&id=bkg_image&layerTypeAPI=bkgHexagonGermanyLayer&width=256&height=256&srs=EPSG%3A3857&bbox=${xMin},${yMin},${xMax},${yMax}`
54
- } else if (this.layer.key == 'azureSatelliteLayer') {
55
- const { apiVersion, tilesetId, subscriptionKey } =
56
- this.layer.layerData.options
57
- imageSrc = imageSrc
58
- .replace('{x}', x)
59
- .replace('{y}', y)
60
- .replace('{z}', zoom)
61
- .replace('{apiVersion}', apiVersion)
62
- .replace('{tilesetId}', tilesetId)
63
- .replace('{subscriptionKey}', subscriptionKey)
64
- imageSrc = imageSrc + `&no-cache=${Date.now()}`
65
53
  } else {
66
54
  imageSrc = imageSrc.replace('{x}', x)
67
55
  imageSrc = imageSrc.replace('{y}', y)
@@ -25,23 +25,6 @@ export default {
25
25
  if (obj.material.dispose) obj.material.dispose()
26
26
  }
27
27
  },
28
- clearPanelsFromChangingRoofs(roofIds) {
29
- const roofs = this.polygons.filter((polygon) =>
30
- roofIds.includes(polygon.id)
31
- )
32
- roofs.forEach((roof) =>
33
- roof.moduleFields.forEach((mf) =>
34
- mf.panels.forEach((panel) => {
35
- let meshTop = this.meshes.panelsMeshes[panel.id + '_top']
36
- let meshSide = this.meshes.panelsMeshes[panel.id + '_side']
37
- if (meshTop || meshSide) {
38
- this.clearMeshFromScene(meshTop, this.scene)
39
- this.clearMeshFromScene(meshSide, this.scene)
40
- }
41
- })
42
- )
43
- )
44
- },
45
28
  clearMeshFromScene(mesh, scene) {
46
29
  if (!mesh || !scene) {
47
30
  return
@@ -87,6 +87,8 @@ export default {
87
87
  cylinder.userData.edgeId = edge.id
88
88
  cylinder.userData.type = 'edgeMeshes'
89
89
  cylinder.userData.layer = edge.layer
90
+ cylinder.frustumCulled = false
91
+ cylinder.renderOrder = 10
90
92
 
91
93
  cylinder.frustumCulled = false
92
94
  cylinder.renderOrder = 10
@@ -8,7 +8,8 @@ import {
8
8
  getNormalVectorFrom3Points,
9
9
  hasNaN,
10
10
  getDistanceBetweenPoints,
11
- intersectOutlines
11
+ intersectOutlines,
12
+ isSameSegment2D
12
13
  } from '@eturnity/eturnity_maths'
13
14
 
14
15
  export function getTriangleVerticesFromOutline(
@@ -152,7 +153,7 @@ export function getWallVertices(polygon) {
152
153
  )
153
154
  })
154
155
 
155
- polygon.holes.forEach((hole) => {
156
+ polygon.holes.forEach((hole, holeIndex) => {
156
157
  let obstacleWallOutline =
157
158
  intersectOutlines(hole.outline, polygon.outline)[0] || []
158
159
  obstacleWallOutline = obstacleWallOutline.map((p) => {
@@ -165,34 +166,47 @@ export function getWallVertices(polygon) {
165
166
  ).z
166
167
  }
167
168
  })
169
+
168
170
  const lengthHole = obstacleWallOutline.length
169
171
  obstacleWallOutline.forEach((p_up_0, index) => {
170
172
  const p_up_1 = obstacleWallOutline[(index + 1) % lengthHole]
171
173
  const p_bottom_0 = { ...p_up_0, z: 0 }
172
174
  const p_bottom_1 = { ...p_up_1, z: 0 }
173
175
 
174
- trianglesVertices.push(
175
- ...[
176
- p_up_0.x / 1000,
177
- p_up_0.y / 1000,
178
- p_up_0.z / 1000,
179
- p_up_1.x / 1000,
180
- p_up_1.y / 1000,
181
- p_up_1.z / 1000,
182
- p_bottom_0.x / 1000,
183
- p_bottom_0.y / 1000,
184
- p_bottom_0.z / 1000,
185
- p_up_1.x / 1000,
186
- p_up_1.y / 1000,
187
- p_up_1.z / 1000,
188
- p_bottom_0.x / 1000,
189
- p_bottom_0.y / 1000,
190
- p_bottom_0.z / 1000,
191
- p_bottom_1.x / 1000,
192
- p_bottom_1.y / 1000,
193
- p_bottom_1.z / 1000
194
- ]
195
- )
176
+ const isEdgeConnectedToRoof = !polygon.holes.some((hole, i) => {
177
+ return (
178
+ holeIndex != i &&
179
+ hole.outline.some((p, p_index, outline) => {
180
+ let p_next_index = (p_index + 1) % outline.length
181
+ return isSameSegment2D([p_up_0, p_up_1], [p, outline[p_next_index]])
182
+ })
183
+ )
184
+ })
185
+
186
+ if (isEdgeConnectedToRoof) {
187
+ trianglesVertices.push(
188
+ ...[
189
+ p_up_0.x / 1000,
190
+ p_up_0.y / 1000,
191
+ p_up_0.z / 1000,
192
+ p_up_1.x / 1000,
193
+ p_up_1.y / 1000,
194
+ p_up_1.z / 1000,
195
+ p_bottom_0.x / 1000,
196
+ p_bottom_0.y / 1000,
197
+ p_bottom_0.z / 1000,
198
+ p_up_1.x / 1000,
199
+ p_up_1.y / 1000,
200
+ p_up_1.z / 1000,
201
+ p_bottom_0.x / 1000,
202
+ p_bottom_0.y / 1000,
203
+ p_bottom_0.z / 1000,
204
+ p_bottom_1.x / 1000,
205
+ p_bottom_1.y / 1000,
206
+ p_bottom_1.z / 1000
207
+ ]
208
+ )
209
+ }
196
210
  })
197
211
  })
198
212
  if (hasNaN(trianglesVertices)) {
@@ -564,7 +578,7 @@ export function updateBufferPanelSideGeometry(panelPolygon, geometry) {
564
578
  panelPolygon.outline,
565
579
  panelOutlineTop
566
580
  )
567
-
581
+
568
582
  if (hasNaN(triangleVertices)) {
569
583
  return null
570
584
  }
@@ -587,7 +601,7 @@ export function updateBufferPanelSideGeometry(panelPolygon, geometry) {
587
601
  geometry.attributes.position.needsUpdate = true
588
602
  geometry.computeVertexNormals()
589
603
  geometry.needsUpdate = true
590
-
604
+
591
605
  return geometry
592
606
  }
593
607
  export function getBufferPanelSideGeometry(panelPolygon) {
@@ -18,25 +18,23 @@ export default {
18
18
  methods: {
19
19
  updateRoofGeometry(geometry, roofPolygon) {
20
20
  const roofOutline = roofPolygon.outline
21
- let cropedHolesOutline = roofPolygon.holes
22
- .filter((h) => h.layer == 'obstacle')
23
- .map((h) => {
24
- //let's crop obstacle with roof outline
25
- const cropedHoleOutline =
26
- intersectOutlines(h.outline, roofPolygon.outline)[0] || []
27
- const outline = cropedHoleOutline.map((p) => {
28
- return {
29
- x: p.x,
30
- y: p.y,
31
- z: verticalProjectionOnPlane(
32
- p,
33
- roofPolygon.normalVector,
34
- roofPolygon.flatOutline[0]
35
- ).z
36
- }
37
- })
38
- return outline
21
+ let cropedHolesOutline = roofPolygon.holes.map((h) => {
22
+ //let's crop obstacle with roof outline
23
+ const cropedHoleOutline =
24
+ intersectOutlines(h.outline, roofPolygon.outline)[0] || []
25
+ const outline = cropedHoleOutline.map((p) => {
26
+ return {
27
+ x: p.x,
28
+ y: p.y,
29
+ z: verticalProjectionOnPlane(
30
+ p,
31
+ roofPolygon.normalVector,
32
+ roofPolygon.flatOutline[0]
33
+ ).z
34
+ }
39
35
  })
36
+ return outline
37
+ })
40
38
 
41
39
  cropedHolesOutline = cropedHolesOutline.filter((outline) => !!outline)
42
40
  geometry = updateBufferRoofGeometry(
@@ -49,25 +47,23 @@ export default {
49
47
  },
50
48
  createRoofGeometry(roofPolygon) {
51
49
  const roofOutline = roofPolygon.outline
52
- let cropedHolesOutline = roofPolygon.holes
53
- .filter((h) => h.layer == 'obstacle')
54
- .map((h) => {
55
- //let's crop obstacle with roof outline
56
- const cropedHoleOutline =
57
- intersectOutlines(h.outline, roofPolygon.outline)[0] || []
58
- const outline = cropedHoleOutline.map((p) => {
59
- return {
60
- x: p.x,
61
- y: p.y,
62
- z: verticalProjectionOnPlane(
63
- p,
64
- roofPolygon.normalVector,
65
- roofPolygon.flatOutline[0]
66
- ).z
67
- }
68
- })
69
- return outline
50
+ let cropedHolesOutline = roofPolygon.holes.map((h) => {
51
+ //let's crop obstacle with roof outline
52
+ const cropedHoleOutline =
53
+ intersectOutlines(h.outline, roofPolygon.outline)[0] || []
54
+ const outline = cropedHoleOutline.map((p) => {
55
+ return {
56
+ x: p.x,
57
+ y: p.y,
58
+ z: verticalProjectionOnPlane(
59
+ p,
60
+ roofPolygon.normalVector,
61
+ roofPolygon.flatOutline[0]
62
+ ).z
63
+ }
70
64
  })
65
+ return outline
66
+ })
71
67
 
72
68
  cropedHolesOutline = cropedHolesOutline.filter((outline) => !!outline)
73
69
  let geometry = getBufferRoofGeometry(roofOutline, cropedHolesOutline)
@@ -296,7 +296,6 @@ export default {
296
296
  method: this.renderRoofsMargin,
297
297
  arg: []
298
298
  })
299
- break
300
299
  case 'selectedModuleFieldChange':
301
300
  methodList.push({
302
301
  name: 'renderEdges',
@@ -380,13 +379,6 @@ export default {
380
379
  arg: []
381
380
  })
382
381
  break
383
- case 'clearPanelFromChangingRoofs':
384
- methodList.push({
385
- name: 'clearPanelsFromChangingRoofs',
386
- method: this.clearPanelsFromChangingRoofs,
387
- arg: [params.roofIds]
388
- })
389
- break
390
382
  case 'selectedPanelChange':
391
383
  methodList.push({
392
384
  name: 'renderModuleFields',
@@ -4,7 +4,8 @@ import {
4
4
  isAlmostSamePoint3D,
5
5
  isAlmostSameSegment2D,
6
6
  isAlmostSameSegment3D,
7
- isAlmostSamePoint2D
7
+ isAlmostSamePoint2D,
8
+ verticalProjectionOnPlane
8
9
  } from '@eturnity/eturnity_maths'
9
10
 
10
11
  export function generateNodes2D(polygons) {
@@ -56,14 +57,15 @@ export function generateNodes2D(polygons) {
56
57
  if (node2D.masterHandle) {
57
58
  node2D.masterHandle.open = node2D.belongsTo.some(
58
59
  (item) =>
60
+ item.index == null ||
59
61
  item.polygon.outline[item.index].open ||
60
62
  item.polygon.outline[item.index].hasWarning
61
63
  )
62
64
  node2D.masterHandle.hasWarning = node2D.belongsTo.some(
63
- (item) => item.polygon.outline[item.index].hasWarning
65
+ (item) => item.index == null || item.polygon.outline[item.index].hasWarning
64
66
  )
65
67
  node2D.masterHandle.selected = node2D.belongsTo.every(
66
- (item) => item.polygon.outline[item.index].selected
68
+ (item) => item.index == null || item.polygon.outline[item.index].selected
67
69
  )
68
70
  }
69
71
  })
@@ -119,7 +121,8 @@ export function generateNodes3D(polygons) {
119
121
  return nodes3D
120
122
  }
121
123
 
122
- export function generateEdges2D(polygons) {
124
+ export function generateEdges2D(polygons, splitEdgesIds = []) {
125
+ console.log("generateEdges2D")
123
126
  let edges2D = []
124
127
  polygons
125
128
  .filter((poly) =>
@@ -159,9 +162,72 @@ export function generateEdges2D(polygons) {
159
162
  index: i,
160
163
  polygon
161
164
  })
165
+ if (polygon.roofs && polygon.roofs.length > 0) {
166
+ polygon.roofs.forEach((supportRoof) => {
167
+ edge2D.belongsTo.push({
168
+ polygonId: supportRoof.id,
169
+ index: null,
170
+ polygon: supportRoof
171
+ })
172
+ })
173
+ }
162
174
  edge2D.id += '_' + polygon.id + '_' + i
163
175
  })
164
176
  })
177
+ edges2D.forEach((edge2D) => {
178
+ edge2D.isSplit = splitEdgesIds.includes(edge2D.id)
179
+ if (edge2D.belongsTo.length > 2) {
180
+ edge2D.belongsTo = edge2D.belongsTo.filter((i) => i.index !== null)
181
+ }
182
+ })
183
+ edges2D.forEach((edge2D) => {
184
+ const isNotSplit = edge2D.belongsTo.every((item, index, array) => {
185
+ if (index == 0) {
186
+ return true
187
+ }
188
+ const outline0 = array[0].polygon.outline
189
+ const outline1 = item.polygon.outline
190
+ let point0, point1, nextPoint0, nextPoint1
191
+ if (array[0].index !== null) {
192
+ point0 = outline0[array[0].index]
193
+ nextPoint0 = outline0[(array[0].index + 1) % outline0.length]
194
+ } else {
195
+ point0 = verticalProjectionOnPlane(
196
+ outline1[item.index],
197
+ array[0].polygon.normalVector,
198
+ array[0].polygon.flatOutline[0]
199
+ )
200
+ nextPoint0 = verticalProjectionOnPlane(
201
+ outline1[(item.index + 1) % outline1.length],
202
+ array[0].polygon.normalVector,
203
+ array[0].polygon.flatOutline[0]
204
+ )
205
+ }
206
+ if (item.index !== null) {
207
+ point1 = outline1[item.index]
208
+ nextPoint1 = outline1[(item.index + 1) % outline1.length]
209
+ } else {
210
+ point1 = verticalProjectionOnPlane(
211
+ outline0[array[0].index],
212
+ item.polygon.normalVector,
213
+ item.polygon.flatOutline[0]
214
+ )
215
+ nextPoint1 = verticalProjectionOnPlane(
216
+ outline0[(array[0].index + 1) % outline0.length],
217
+ item.polygon.normalVector,
218
+ item.polygon.flatOutline[0]
219
+ )
220
+ }
221
+ return isAlmostSameSegment3D(
222
+ [point0, nextPoint0],
223
+ [point1, nextPoint1],
224
+ mmTolerance
225
+ )
226
+ })
227
+ if (!isNotSplit && edge2D.belongsTo.length == 2 && edge2D.layer == 'roof') {
228
+ edge2D.isSplit = true
229
+ }
230
+ })
165
231
  return edges2D
166
232
  }
167
233
 
@@ -8,7 +8,7 @@ import { hydrateData } from './hydrateData.js'
8
8
 
9
9
  const init_state = {
10
10
  isLoading: false,
11
-
11
+
12
12
  polygons: [],
13
13
  nodes: [],
14
14
  edges: [],
@@ -189,29 +189,6 @@ function getLayers() {
189
189
  }
190
190
  )
191
191
 
192
- const azureSatelliteLayer = L.tileLayer(
193
- 'https://atlas.microsoft.com/map/tile?' +
194
- 'api-version={apiVersion}' +
195
- '&tilesetId={tilesetId}' +
196
- '&subscription-key={subscriptionKey}' +
197
- '&zoom={z}' +
198
- '&x={x}' +
199
- '&y={y}',
200
- {
201
- layerTypeAPI: 'azureSatelliteLayer',
202
- id: 'azure_satellite',
203
- attribution: `\u00A9 ${new Date().getFullYear()} EarthStar Geographics, Microsoft`,
204
- minZoom: leafletMapLayersConfig['azureSatelliteLayer']['minZoom'],
205
- maxZoom: leafletMapLayersConfig['azureSatelliteLayer']['maxZoom'],
206
- maxNativeZoom:
207
- leafletMapLayersConfig['azureSatelliteLayer']['maxNativeZoom'],
208
- // query parameters
209
- apiVersion: '2022-08-01',
210
- tilesetId: 'microsoft.imagery',
211
- subscriptionKey: process.env.VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY
212
- }
213
- )
214
-
215
192
  return [
216
193
  {
217
194
  name: 'SwissTopo (satellite)',
@@ -282,11 +259,6 @@ function getLayers() {
282
259
  name: 'GeoPortal France (satellite)',
283
260
  key: 'geoportail_fr_wmts_ortho_layer',
284
261
  layerData: GeoLayer_HR
285
- },
286
- {
287
- name: 'Bing (satellite)',
288
- key: 'azureSatelliteLayer',
289
- layerData: azureSatelliteLayer
290
262
  }
291
263
  ]
292
264
  }
@@ -63,10 +63,5 @@ export const leafletMapLayersConfig = {
63
63
  maxZoom: 22,
64
64
  maxNativeZoom: 19,
65
65
  minZoom: 6
66
- },
67
- azureSatelliteLayer: {
68
- maxZoom: 25,
69
- maxNativeZoom: 19,
70
- minZoom: 1
71
66
  }
72
67
  }
@@ -1,20 +0,0 @@
1
- #!/usr/bin/env bash
2
- log() {
3
- timestamp=$(date +"%Y-%m-%d %H:%M:%S")
4
- echo "$timestamp $1"
5
- }
6
-
7
- log "Building customization for image ..."
8
-
9
- rm -f .env && cp .env.bitbucket .env
10
-
11
- Customize API keys
12
- if [[ $NAMESPACE = 'eturnity-prod'* ]]; then
13
- sed -i "s|{{VUE_APP_GOOGLE_MAP_API_KEY}}|$BB_VUE_APP_GOOGLE_MAP_API_KEY_PROD|g" .env
14
- sed -i "s|{{VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY}}|$BB_VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY_PROD|g" .env
15
- else
16
- sed -i "s|{{VUE_APP_GOOGLE_MAP_API_KEY}}|$BB_VUE_APP_GOOGLE_MAP_API_KEY_DEV|g" .env
17
- sed -i "s|{{VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY}}|$BB_VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY_DEV|g" .env
18
- fi
19
-
20
- log "Building customization for image done"
package/.env.bitbucket DELETED
@@ -1,2 +0,0 @@
1
- VUE_APP_GOOGLE_MAP_API_KEY={{VUE_APP_GOOGLE_MAP_API_KEY}}
2
- VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY={{VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY}}
package/jsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "paths": {
4
- "@/*": ["./src/*"]
5
- }
6
- },
7
- "exclude": ["node_modules", "dist"]
8
- }