@eturnity/eturnity_3d 7.16.0-qa-dev03.2 → 7.16.0-qa03-7.16.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.
- package/.bitbucket/ci/build_customization_config.sh +20 -0
- package/.env +2 -1
- package/.env.bitbucket +2 -0
- package/bitbucket-pipelines.yml +2 -0
- package/package.json +2 -2
- package/src/helper/customProvider.js +13 -1
- package/src/utils/layers.js +28 -0
- package/src/utils/leaflet-config.service.js +5 -0
|
@@ -0,0 +1,20 @@
|
|
|
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
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
VUE_APP_GOOGLE_MAP_API_KEY=
|
|
1
|
+
VUE_APP_GOOGLE_MAP_API_KEY={{API_KEY_FOR_LOCAL_DEVELOPMENT}}
|
|
2
|
+
VUE_APP_AZURE_MAP_SUBSCRIPTION_KEY={{API_KEY_FOR_LOCAL_DEVELOPMENT}}
|
package/.env.bitbucket
ADDED
package/bitbucket-pipelines.yml
CHANGED
|
@@ -22,6 +22,7 @@ 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
|
|
25
26
|
- echo "{\"version\":\"${BB_ETURNITY_VERSION}\",\"full_version\":\"${TAG}\"}" > ./src/assets/version.json
|
|
26
27
|
- docker build -t $IMAGE_NAME .
|
|
27
28
|
- docker login --username $BB_PIPELINE_REGISTRY_TOKEN --password $BB_PIPELINE_REGISTRY_TOKEN $BB_CONTAINER_REGISTRY
|
|
@@ -65,6 +66,7 @@ definitions:
|
|
|
65
66
|
script:
|
|
66
67
|
- ./.bitbucket/ci/build_image_config.sh
|
|
67
68
|
- export $(cat .env.image | xargs)
|
|
69
|
+
- ./.bitbucket/ci/build_customization_config.sh
|
|
68
70
|
- echo "{\"version\":\"${BB_ETURNITY_VERSION}\",\"full_version\":\"${TAG}\"}" > ./src/assets/version.json
|
|
69
71
|
- export RELEASE_TAG=latest
|
|
70
72
|
- 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-
|
|
4
|
+
"version": "7.16.0-qa03-7.16.1",
|
|
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.16.0-
|
|
13
|
+
"@eturnity/eturnity_maths": "7.16.0-qa03-7.16.1",
|
|
14
14
|
"core-js": "^2.6.12",
|
|
15
15
|
"cors": "^2.8.5",
|
|
16
16
|
"earcut": "^2.2.4",
|
|
@@ -26,7 +26,8 @@ export class CustomProvider extends MapProvider {
|
|
|
26
26
|
resolve(this.defaultImage)
|
|
27
27
|
} else if (zoom > maxZoomLayer) {
|
|
28
28
|
} else {
|
|
29
|
-
|
|
29
|
+
const image = document.createElement('img')
|
|
30
|
+
|
|
30
31
|
image.onload = function () {
|
|
31
32
|
image.style.backgroundColor = 'red'
|
|
32
33
|
resolve(image)
|
|
@@ -50,6 +51,17 @@ export class CustomProvider extends MapProvider {
|
|
|
50
51
|
const yMax = yMin + resolution_mPerTile
|
|
51
52
|
|
|
52
53
|
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()}`
|
|
53
65
|
} else {
|
|
54
66
|
imageSrc = imageSrc.replace('{x}', x)
|
|
55
67
|
imageSrc = imageSrc.replace('{y}', y)
|
package/src/utils/layers.js
CHANGED
|
@@ -189,6 +189,29 @@ 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
|
+
|
|
192
215
|
return [
|
|
193
216
|
{
|
|
194
217
|
name: 'SwissTopo (satellite)',
|
|
@@ -259,6 +282,11 @@ function getLayers() {
|
|
|
259
282
|
name: 'GeoPortal France (satellite)',
|
|
260
283
|
key: 'geoportail_fr_wmts_ortho_layer',
|
|
261
284
|
layerData: GeoLayer_HR
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: 'Bing (satellite)',
|
|
288
|
+
key: 'azureSatelliteLayer',
|
|
289
|
+
layerData: azureSatelliteLayer
|
|
262
290
|
}
|
|
263
291
|
]
|
|
264
292
|
}
|