Skip to content

Commit 9df9639

Browse files
committed
Merge remote-tracking branch 'origin/main' into ftr/rotate-map
2 parents 91bcb2a + 6559a0e commit 9df9639

File tree

4 files changed

+1275
-1437
lines changed

4 files changed

+1275
-1437
lines changed

config/locales/en.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ en:
101101
upload: "Upload GeoJSON"
102102
fullscreen: "Toggle full-screen"
103103
rotate: "Reset rotation"
104-
zoom-in: "Zoom in"
105-
zoom-out: "Zoom out"
104+
zoom_in: "Zoom in"
105+
zoom_out: "Zoom out"
106+
point: "Point editor"
107+
linestring: "Line editor"
108+
polygon: "Area editor"
106109
modal:
107110
load: "Load"
108111
cancel: "Cancel"

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@
2020
},
2121
"homepage": "https://github.com/gtt-project/redmine_gtt#readme",
2222
"dependencies": {
23-
"@juggle/resize-observer": "^3.3.1",
24-
"@material-design-icons/font": "^0.11.8",
23+
"@juggle/resize-observer": "^3.4.0",
24+
"@material-design-icons/font": "^0.12.1",
2525
"geojson": "^0.5.0",
26-
"ol": "^6.14.1",
27-
"ol-ext": "^3.2.22"
26+
"ol": "^6.15.1",
27+
"ol-ext": "^3.2.30"
2828
},
2929
"devDependencies": {
30-
"@types/geojson": "^7946.0.8",
30+
"@types/geojson": "^7946.0.10",
3131
"@types/jquery": "^3.5.14",
3232
"@types/jqueryui": "^1.12.16",
3333
"@types/ol-ext": "npm:@siedlerchr/types-ol-ext",
34-
"css-loader": "^5.1.1",
35-
"sass": "^1.32.8",
36-
"sass-loader": "^11.0.1",
37-
"style-loader": "^2.0.0",
38-
"ts-loader": "^8.0.17",
39-
"typescript": "^4.2.3",
40-
"webpack": "^5.24.4",
41-
"webpack-cli": "^4.5.0"
34+
"css-loader": "^6.7.1",
35+
"sass": "^1.54.9",
36+
"sass-loader": "^13.0.2",
37+
"style-loader": "^3.3.1",
38+
"ts-loader": "^9.3.1",
39+
"typescript": "^4.8.3",
40+
"webpack": "^5.74.0",
41+
"webpack-cli": "^4.10.0"
4242
}
4343
}

src/components/gtt-client.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ interface FilterOption {
6464

6565
interface TileLayerSource {
6666
layer: typeof Tile
67-
source: typeof OSM | typeof XYZ
67+
source: typeof OSM | typeof XYZ | typeof TileWMS
6868
}
6969

7070
interface ImageLayerSource {
@@ -141,6 +141,10 @@ export class GttClient {
141141
rotateOptions: {},
142142
attributionOptions: {
143143
collapsible: false
144+
},
145+
zoomOptions: {
146+
zoomInTipLabel: this.i18n.control.zoom_in,
147+
zoomOutTipLabel: this.i18n.control.zoom_out
144148
}
145149
})
146150
})
@@ -171,7 +175,7 @@ export class GttClient {
171175
if (tileLayerSource) {
172176
const l = new (tileLayerSource.layer)({
173177
visible: false,
174-
source: new (tileLayerSource.source)(layer.options)
178+
source: new (tileLayerSource.source)(layer.options as any)
175179
})
176180

177181
l.set('lid', layer.id)
@@ -472,7 +476,7 @@ export class GttClient {
472476
})
473477
mainbar.addControl(editbar)
474478

475-
types.forEach((type, idx) => {
479+
types.forEach((type: any, idx) => {
476480
const draw = new Draw({
477481
type: type,
478482
source: this.vector.getSource()
@@ -498,7 +502,7 @@ export class GttClient {
498502

499503
const control = new Toggle({
500504
html: `<i class="material-icons" >${mdi}</i>`,
501-
title: type,
505+
title: this.i18n.control[type.toLowerCase()],
502506
interaction: draw,
503507
active: (idx === 0)
504508
})
@@ -557,7 +561,7 @@ export class GttClient {
557561

558562
editbar.addControl(new Button({
559563
html: '<i class="material-icons">file_upload</i>',
560-
title: this.i18n.control.geojson,
564+
title: this.i18n.control.upload,
561565
handleClick: () => {
562566
dialog.dialog('open')
563567
}

0 commit comments

Comments
 (0)