Skip to content

Commit f2fa980

Browse files
Merge branch 'next' into vue3/migrate-plugin-zoom
2 parents 4f2c7f8 + 662d26a commit f2fa980

File tree

93 files changed

+3257
-3701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3257
-3701
lines changed

docs/troubleshooting.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Troubleshooting
3+
---
4+
5+
## Common pitfalls
6+
7+
### Map is not displayed
8+
9+
- For Safari on iPadOS: Are the options "Advanced tracking protections" and "blocking of all cookies" enabled? If so, disable them and try again.

examples/iceberg/components/IcebergMap.vue

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@
2929
import type { PolarContainer } from '@polar/polar'
3030
3131
import { addPlugins, getStore, subscribe } from '@polar/polar'
32+
import pluginAddressSearch from '@polar/polar/plugins/addressSearch'
3233
import pluginFullscreen from '@polar/polar/plugins/fullscreen'
3334
import pluginIconMenu from '@polar/polar/plugins/iconMenu'
35+
import pluginLayerChooser from '@polar/polar/plugins/layerChooser'
36+
import pluginPins from '@polar/polar/plugins/pins'
37+
import pluginReverseGeocoder from '@polar/polar/plugins/reverseGeocoder'
3438
import pluginScale from '@polar/polar/plugins/scale'
3539
import pluginToast from '@polar/polar/plugins/toast'
3640
import { ref, useTemplateRef, watch } from 'vue'
@@ -53,6 +57,10 @@ watch(map, (map) => {
5357
layoutTag: 'TOP_RIGHT',
5458
menus: [
5559
[
60+
{
61+
plugin: pluginLayerChooser({}),
62+
icon: 'kern-icon-fill--layers',
63+
},
5664
{
5765
plugin: pluginFullscreen({ renderType: 'iconMenu' }),
5866
},
@@ -64,6 +72,36 @@ watch(map, (map) => {
6472
layoutTag: 'BOTTOM_RIGHT',
6573
showScaleSwitcher: false,
6674
}),
75+
pluginAddressSearch({
76+
displayComponent: true,
77+
layoutTag: 'TOP_LEFT',
78+
searchMethods: [],
79+
}),
80+
pluginPins({
81+
coordinateSources: [{ plugin: 'addressSearch', key: 'chosenAddress' }],
82+
boundary: {
83+
layerId: '1693',
84+
},
85+
movable: 'drag',
86+
style: {
87+
fill: '#FF0019',
88+
},
89+
toZoomLevel: 7,
90+
}),
91+
pluginReverseGeocoder({
92+
url: 'https://geodienste.hamburg.de/HH_WPS',
93+
coordinateSources: [
94+
{
95+
plugin: 'pins',
96+
key: 'coordinate',
97+
},
98+
],
99+
addressTarget: {
100+
plugin: 'addressSearch',
101+
key: 'selectResult',
102+
},
103+
zoomTo: 7,
104+
}),
67105
pluginToast({
68106
displayComponent: true,
69107
layoutTag: 'BOTTOM_MIDDLE',

examples/iceberg/services.ts

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
export default [
2+
{
3+
id: '23420',
4+
name: 'basemap.de Web Raster Farbe',
5+
url: 'https://sgx.geodatenzentrum.de/wms_basemapde',
6+
typ: 'WMS',
7+
layers: 'de_basemapde_web_raster_farbe',
8+
format: 'image/png',
9+
version: '1.3.0',
10+
singleTile: false,
11+
transparent: true,
12+
transparency: 0,
13+
urlIsVisible: true,
14+
tilesize: 512,
15+
gutter: 0,
16+
minScale: '0',
17+
maxScale: '2500000',
18+
legendURL: '',
19+
cache: false,
20+
featureCount: 5,
21+
},
22+
{
23+
id: '23421',
24+
name: 'basemap.de Web Raster Grau',
25+
url: 'https://sgx.geodatenzentrum.de/wms_basemapde',
26+
typ: 'WMS',
27+
layers: 'de_basemapde_web_raster_grau',
28+
format: 'image/png',
29+
version: '1.3.0',
30+
singleTile: false,
31+
transparent: true,
32+
transparency: 0,
33+
urlIsVisible: true,
34+
tilesize: 512,
35+
gutter: 0,
36+
minScale: '0',
37+
maxScale: '2500000',
38+
legendURL: '',
39+
cache: false,
40+
featureCount: 5,
41+
},
42+
{
43+
id: '1454',
44+
name: 'Ausgleichsflächen',
45+
url: 'https://geodienste.hamburg.de/HH_WFS_Ausgleichsflaechen',
46+
typ: 'WFS',
47+
featureType: 'ausgleichsflaechen',
48+
outputFormat: 'XML',
49+
version: '1.1.0',
50+
featureNS: 'https://registry.gdi-de.org/id/de.hh.up',
51+
featurePrefix: 'de.hh.up',
52+
legendURL: '',
53+
},
54+
{
55+
id: '6059',
56+
name: 'MML Anliegen',
57+
url: 'https://geodienste.hamburg.de/lgv-config/anliegen_extern.json',
58+
typ: 'GeoJSON',
59+
format: 'XML',
60+
version: '1.0',
61+
minScale: '0',
62+
maxScale: '2500000',
63+
legendURL: '',
64+
urlIsVisible: true,
65+
},
66+
{
67+
id: 'denkmaelerWMS',
68+
name: 'Denkmal WMS',
69+
url: 'https://efi2-deegree.schleswig-holstein.de/dish-deegree/services/wms_shp',
70+
typ: 'WMS',
71+
layers: '0,1,2,3,4,6,24,25',
72+
legendURL: 'ignore',
73+
format: 'image/png',
74+
version: '1.3.0',
75+
transparent: true,
76+
},
77+
{
78+
id: '1693',
79+
name: 'Landesgrenze',
80+
url: 'https://geodienste.hamburg.de/HH_WFS_Verwaltungsgrenzen',
81+
typ: 'WFS',
82+
featureType: 'landesgrenze',
83+
outputFormat: 'XML',
84+
version: '1.1.0',
85+
featureNS: 'http://www.deegree.org/app',
86+
featurePrefix: 'app',
87+
},
88+
]

examples/iceberg/stores/iceberg.ts

Lines changed: 82 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import {
2-
fetchServiceRegister,
32
type MapConfiguration,
43
type MasterportalApiServiceRegister,
54
} from '@polar/polar'
65
import { defineStore } from 'pinia'
7-
import { ref, reactive, watch } from 'vue'
6+
import { ref, reactive } from 'vue'
7+
8+
import type { MpapiParameters } from '@/lib/getFeatures/types'
9+
10+
import services from '../services'
811

912
export const useIcebergStore = defineStore('iceberg', () => {
1013
const mapConfiguration = reactive<MapConfiguration>({
@@ -14,29 +17,92 @@ export const useIcebergStore = defineStore('iceberg', () => {
1417
id: '23420',
1518
visibility: true,
1619
type: 'background',
17-
name: 'snowbox.layers.basemap',
20+
name: 'Basemap.de (Farbe)',
21+
},
22+
{
23+
id: '23421',
24+
visibility: true,
25+
type: 'background',
26+
name: 'Basemap.de (Grau)',
27+
},
28+
{
29+
id: '1454',
30+
type: 'mask',
31+
name: 'Ausgleichsflächen',
32+
styleId: 'panda',
33+
visibility: true,
34+
minZoom: 5,
35+
},
36+
{
37+
id: '1693',
38+
visibility: true,
39+
hideInMenu: true,
40+
type: 'mask',
41+
name: 'Stadtgrenze Hamburg',
42+
},
43+
{
44+
id: 'denkmaelerWMS',
45+
type: 'mask',
46+
name: 'Kulturdenkmale',
47+
visibility: true,
48+
options: {
49+
layers: {
50+
order: '6,24,25,4,3,2,1,0',
51+
title: {
52+
/* eslint-disable @typescript-eslint/naming-convention */
53+
6: 'Denkmalbereich',
54+
24: 'Mehrheit von baulichen Anlagen',
55+
25: 'Sachgesamtheit',
56+
4: 'Baudenkmal',
57+
3: 'Gründenkmal',
58+
2: 'Gewässer',
59+
1: 'Baudenkmal (Fläche)',
60+
0: 'Gründenkmal (Fläche)',
61+
/* eslint-enable @typescript-eslint/naming-convention */
62+
},
63+
legend: true,
64+
},
65+
},
1866
},
1967
],
20-
startCenter: [573364, 6028874],
68+
startCenter: [565874, 5934140],
2169
layout: 'nineRegions',
70+
addressSearch: {
71+
searchMethods: [
72+
{
73+
queryParameters: {
74+
searchStreets: true,
75+
searchHouseNumbers: true,
76+
} as MpapiParameters,
77+
type: 'mpapi',
78+
url: 'https://geodienste.hamburg.de/HH_WFS_GAGES?service=WFS&request=GetFeature&version=2.0.0',
79+
},
80+
],
81+
minLength: 3,
82+
waitMs: 300,
83+
focusAfterSearch: true,
84+
groupProperties: {
85+
// @ts-expect-error | defaultGroup has a default label
86+
defaultGroup: {
87+
limitResults: 5,
88+
},
89+
},
90+
},
2291
fullscreen: {
2392
displayComponent: true,
2493
layoutTag: 'TOP_RIGHT',
2594
},
95+
pins: {
96+
coordinateSources: [{ plugin: 'addressSearch', key: 'chosenAddress' }],
97+
movable: 'drag',
98+
style: {
99+
fill: '#FF0019',
100+
},
101+
toZoomLevel: 7,
102+
},
26103
})
27104

28-
const serviceRegisterUrl = ref(
29-
'https://geodienste.hamburg.de/services-internet.json'
30-
)
31-
32-
const serviceRegister = ref<MasterportalApiServiceRegister>([])
33-
watch(
34-
serviceRegisterUrl,
35-
async (url) => {
36-
serviceRegister.value = await fetchServiceRegister(url)
37-
},
38-
{ immediate: true }
39-
)
105+
const serviceRegister = ref<MasterportalApiServiceRegister>(services)
40106

41107
return {
42108
mapConfiguration,

0 commit comments

Comments
 (0)