Skip to content

Commit 5215618

Browse files
committed
Merge remote-tracking branch 'origin/fix/zoom-overlay' into fix/zoom-overlay
2 parents a8e8da2 + de8a80f commit 5215618

File tree

35 files changed

+301
-259
lines changed

35 files changed

+301
-259
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Other clients with more specific code include the [Denkmalkarte Schleswig-Holste
5454
<table align="center">
5555
<tr align="center">
5656
<td align="center"><img src="./pages/assets/landessymbole/bremen.svg" alt="Bremer Wappenzeichen" height="120px" style="object-fit: contain;"><div>Freie Hansestadt Bremen</div></td>
57-
<td align="center"><img src="./pages/assets/landessymbole/hamburg.svg" alt="Hamburg-Symbol" height="120px" style="object-fit: contain;"><div>Freie Freie und Hansestadt Hamburg</div></td>
57+
<td align="center"><img src="./pages/assets/landessymbole/hamburg.svg" alt="Hamburg-Symbol" height="120px" style="object-fit: contain;"><div>Freie und Hansestadt Hamburg</div></td>
5858
</tr>
5959
<tr align="center">
6060
<td align="center"><img src="./pages/assets/landessymbole/sachsen-anhalt.svg" alt="Landessymbol Sachsen-Anhalt" height="120px" style="object-fit: contain;"><div>Sachsen-Anhalt</div></td>

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/clients/dish/src/mapConfig.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export const mapConfiguration = {
2929
startResolution: 264.583190458,
3030
startCenter: [553655.72, 6004479.25],
3131
extent: [426205.6233, 5913461.9593, 650128.6567, 6101486.8776],
32-
epsg: 'EPSG:25832',
3332
locales,
3433
layers: [
3534
{
@@ -230,18 +229,4 @@ export const mapConfiguration = {
230229
{ resolution: 0.02645831904, scale: 100, zoomLevel: zoomLevel++ },
231230
{ resolution: 0.01322915952, scale: 50, zoomLevel: zoomLevel++ },
232231
],
233-
namedProjections: [
234-
[
235-
'EPSG:31467',
236-
'+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +no_defs +type=crs',
237-
],
238-
[
239-
'EPSG:25832',
240-
'+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
241-
],
242-
[
243-
'EPSG:4326',
244-
'+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs',
245-
],
246-
],
247232
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## unpublished
4+
5+
- Feature: Directly expose `createMap` to be able to import it directly when using this client.
6+
37
## 1.0.0
48

59
Initial release.

packages/clients/generic/src/polar-client.ts

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -156,38 +156,40 @@ const addPlugins = (coreInstance: PolarCore, enabledPlugins: PluginName[]) => {
156156
)
157157
}
158158

159-
export default {
160-
createMap: ({
161-
containerId,
162-
services,
163-
mapConfiguration,
164-
enabledPlugins = [],
165-
modifyLayerConfiguration = (x) => x,
166-
}: {
167-
containerId: string
168-
services: object[]
169-
mapConfiguration: MapConfig
170-
enabledPlugins: Array<PluginName>
171-
modifyLayerConfiguration: (layerConf: object[]) => object[]
172-
}) =>
173-
new Promise((resolve) => {
174-
const coreInstance = { ...core }
159+
export const createMap = ({
160+
containerId,
161+
services,
162+
mapConfiguration,
163+
enabledPlugins = [],
164+
modifyLayerConfiguration = (x) => x,
165+
}: {
166+
containerId: string
167+
services: object[]
168+
mapConfiguration: MapConfig
169+
enabledPlugins: Array<PluginName>
170+
modifyLayerConfiguration: (layerConf: object[]) => object[]
171+
}) =>
172+
new Promise((resolve) => {
173+
const coreInstance = { ...core }
174+
175+
addPlugins(coreInstance, enabledPlugins)
175176

176-
addPlugins(coreInstance, enabledPlugins)
177+
coreInstance.rawLayerList.initializeLayerList(
178+
services,
179+
async (layerConf) => {
180+
const client = await coreInstance.createMap({
181+
containerId,
182+
mapConfiguration: {
183+
...mapConfiguration,
184+
layerConf: modifyLayerConfiguration(layerConf),
185+
},
186+
})
177187

178-
coreInstance.rawLayerList.initializeLayerList(
179-
services,
180-
async (layerConf) => {
181-
const client = await coreInstance.createMap({
182-
containerId,
183-
mapConfiguration: {
184-
...mapConfiguration,
185-
layerConf: modifyLayerConfiguration(layerConf),
186-
},
187-
})
188+
resolve(client)
189+
}
190+
)
191+
})
188192

189-
resolve(client)
190-
}
191-
)
192-
}),
193+
export default {
194+
createMap,
193195
}

packages/clients/meldemichel/src/mapConfigurations.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const hamburgRed = '#ff0019'
2525

2626
const commonMapConfiguration: Partial<MapConfig> = {
2727
checkServiceAvailability: false, // service register too long
28-
epsg: 'EPSG:25832',
2928
locales: language,
3029
vuetify: {
3130
theme: {
@@ -39,16 +38,6 @@ const commonMapConfiguration: Partial<MapConfig> = {
3938
},
4039
},
4140
},
42-
namedProjections: [
43-
[
44-
'EPSG:25832',
45-
'+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
46-
],
47-
[
48-
'EPSG:4326',
49-
'+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs',
50-
],
51-
],
5241
}
5342

5443
const commonLayers: LayerConfiguration[] = [

packages/clients/snowbox/src/mapConfiguration.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,8 @@ const uBahn = '23053'
1111

1212
const hamburgBorder = '6074'
1313

14-
/**
15-
* bitbucket.org/geowerkstatt-hamburg/masterportalapi/src/master/src/defaults.js
16-
* implicitly using masterportalAPI HH defaults by fallback
17-
* they can be overwritten in this object
18-
*/
1914
export const mapConfiguration = {
2015
language: 'en',
21-
epsg: 'EPSG:25832',
2216
locales: language,
2317
vuetify: {
2418
theme: {
@@ -32,20 +26,6 @@ export const mapConfiguration = {
3226
},
3327
},
3428
},
35-
namedProjections: [
36-
[
37-
'EPSG:25832',
38-
'+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
39-
],
40-
[
41-
'EPSG:4326',
42-
'+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs',
43-
],
44-
[
45-
'EPSG:4647',
46-
'+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=32500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
47-
],
48-
],
4929
addressSearch: {
5030
searchMethods: [
5131
{

packages/clients/textLocator/src/mapConfig.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export const mapConfiguration: Partial<MapConfig> = {
2121
extent: [
2222
288427.40898665343, 5888233.576754751, 880090.4063210202, 6188713.349959846,
2323
],
24-
epsg: 'EPSG:25832',
2524
locales,
2625
vuetify: { theme },
2726
layers: [
@@ -86,22 +85,4 @@ export const mapConfiguration: Partial<MapConfig> = {
8685
{ resolution: 0.2645831904584105, scale: 1000, zoomLevel: zoomLevel++ },
8786
{ resolution: 0.1322915952292052, scale: 500, zoomLevel: zoomLevel++ },
8887
],
89-
namedProjections: [
90-
[
91-
'EPSG:31467',
92-
'+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +no_defs +type=crs',
93-
],
94-
[
95-
'EPSG:25832',
96-
'+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
97-
],
98-
[
99-
'EPSG:3857',
100-
'+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs',
101-
],
102-
[
103-
'EPSG:4326',
104-
'+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs',
105-
],
106-
],
10788
}

packages/core/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
- Breaking: Remove support for marking client CSS via `data-polar="true"`. Please use the configuration parameter `stylePath` instead.
77
- Feature: Add new state parameter `mapHasDimensions` to let plugins have a "hook" to react on when the map is ready.
88
- Feature: Add `deviceIsHorizontal` as a getter to have a more central place to check if the device is in landscape mode.
9+
- Feature: Add clearer documentation regarding `@masterportal/masterportalapi` related configuration parameters including examples.
10+
- Feature: Officially add support for WMTS layers.
11+
- Feature: Add reasonable default values for configuration parameters `epsg`, `options`, `namedProjections` and `startResolution`.
12+
- Fix: Document `rawLayerList.initializeLayerList` as an essential step when creating a client.
13+
- Fix: Move basic documentation of `layers` from `@polar/plugin-layer-chooser` to `@polar/core`.
914
- Fix: Adjust documentation to properly describe optionality of configuration parameters.
1015
- Fix: Add package `events` as a dependency to fix issue with `xml2js`. See https://github.com/Leonidas-from-XIV/node-xml2js/issues/697 for more information.
1116
- Fix: Adjust overlay to properly be displayed on macOS devices.

0 commit comments

Comments
 (0)