Skip to content

Commit

Permalink
Merge branch 'main' into fix/custom-search-type-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dopenguin authored Feb 23, 2024
2 parents d2111c6 + 257dd3a commit 3881419
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 8 deletions.
5 changes: 4 additions & 1 deletion packages/clients/afm/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ In your HTML, a div with unique ID is required that holds the following style pr
position: relative;
"
id="polarstern"
/>
>
<!-- Optional, may use if your page does not have its own <noscript> information -->
<noscript>Please use a browser with active JavaScript to use the map client.</noscript>
</div>
```

```js
Expand Down
4 changes: 3 additions & 1 deletion packages/clients/afm/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ <h2>Karte</h2>
box-shadow: 0px 0px 5px 3px rgba(255, 255, 255, 0.5);
"
id="polarstern"
></div>
>
<noscript>Bitte benutzen Sie einen Browser mit aktiviertem JavaScript, um den Kartenklienten zu nutzen.</noscript>
</div>
<h2>Beispiel für programmatische Informationsbindung</h2>
<p>Aktuelle Zoomstufe: <span id="vuex-target-zoom" /></p>
<p>Featureinformationen: <span id="vuex-target-gfi" /></p>
Expand Down
4 changes: 3 additions & 1 deletion packages/clients/afm/example/prod-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ <h2>Karte</h2>
box-shadow: 0px 0px 5px 3px rgba(255, 255, 255, 0.5);
"
id="polarstern"
></div>
>
<noscript>Bitte benutzen Sie einen Browser mit aktiviertem JavaScript, um den Kartenklienten zu nutzen.</noscript>
</div>
<h2>Beispiel für programmatische Informationsbindung</h2>
<p>Aktuelle Zoomstufe: <span id="vuex-target-zoom" /></p>
<p>Featureinformationen: <span id="vuex-target-gfi" /></p>
Expand Down
4 changes: 3 additions & 1 deletion packages/clients/dish/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
</head>
<body style="width: 100%; height: 100%; overscroll-behavior: contain">
<div style="width: 100%; height: 100%">
<div id="polarstern"></div>
<div id="polarstern">
<noscript>Bitte benutzen Sie einen Browser mit aktiviertem JavaScript, um den Kartenklienten zu nutzen.</noscript>
</div>
</div>
<script type="module" src="./polar-client.ts"></script>
</body>
Expand Down
16 changes: 16 additions & 0 deletions packages/clients/generic/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ The method expects a single object with the following parameters.
| enabledPlugins | string[]? | This is a client-specific field. Since the `@polar/client-generic` client contains all existing plugins, they are activated by strings. The strings match their package names: `'address-search' \| 'attributions' \| 'draw'* \| 'export' \| 'filter'* \| 'fullscreen'* \| 'geo-location'* \| 'gfi'* \| 'icon-menu' \| 'layer-chooser'* \| 'legend' \| 'loading-indicator' \| 'pins' \| 'reverse-geocoder' \| 'scale' \| 'toast' \| 'zoom'*`. The plugins marked with * are nested in the `'icon-menu'` in this pre-layouting, hence they depend upon it being active, too. |
| modifyLayerConfiguration | ((layerConf: object[]) => object[])? | Defaults to identity function. This function is applied to the loaded layer configuration before usage. That is, the `services` can be modified by this to e.g. set parameters not supported by the service register, add additional layers, and so on. |

In your HTML, a div with unique ID (`containerId` from above) is required that holds the following style properties. Width and height can be changed as you need, but are required to be defined.

```html
<div
style="
width: 680px;
height: 420px;
position: relative;
"
id="polarstern"
>
<!-- Optional, may use if your page does not have its own <noscript> information -->
<noscript>Please use a browser with active JavaScript to use the map client.</noscript>
</div>
```

`createMap` returns a Promise of a map instance. This returned instance is required to retrieve information from the map.

The package also includes a `style.css` and an `index.html` file. The `style.css`'s relative path must, if it isn't the default value `'./style.css'`, be included in the `mapConfiguration` as follows:
Expand Down
5 changes: 4 additions & 1 deletion packages/clients/meldemichel/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ A document rendering the map client could e.g. look like this:
</style>
</head>
<body>
<div id="meldemichel-map-client"></div>
<div id="meldemichel-map-client">
<!-- Optional, may use if your page does not have its own <noscript> information -->
<noscript>Please use a browser with active JavaScript to use the map client.</noscript>
</div>
<script type="module">
import meldemichelMapClient from './client-meldemichel.js'
Expand Down
4 changes: 3 additions & 1 deletion packages/clients/meldemichel/src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
</head>
<body style="width: 100%; height: 100%; overscroll-behavior: contain">
<div style="width: 100%; height: 100%">
<div id="polarstern"></div>
<div id="polarstern">
<noscript>Bitte benutzen Sie einen Browser mit aktiviertem JavaScript, um den Kartenklienten zu nutzen.</noscript>
</div>
</div>
<script type="module">
import client from './client-meldemichel.js'
Expand Down
4 changes: 3 additions & 1 deletion packages/clients/meldemichel/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
</head>
<body style="width: 100%; height: 100%; overscroll-behavior: contain">
<div style="width: 100%; height: 100%">
<div id="polarstern"></div>
<div id="polarstern">
<noscript>Bitte benutzen Sie einen Browser mit aktiviertem JavaScript, um den Kartenklienten zu nutzen.</noscript>
</div>
</div>
<script type="module">
import client from './polar-client.ts'
Expand Down
4 changes: 3 additions & 1 deletion packages/clients/snowbox/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ <h2>🗺️ Map</h2>
<option value="de">German</option>
</select>
</label>
<div id="polarstern" class="polarstern"></div>
<div id="polarstern" class="polarstern">
<noscript>Please use a browser with active JavaScript to use the map client.</noscript>
</div>
<h2>Example for programmatic information binding</h2>
<p>
This illustrates which kind of data can be retrieved from the map client.
Expand Down
1 change: 1 addition & 0 deletions pages/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head>
<link rel="icon" href="./assets/iceberg_icon.svg">
<link rel="stylesheet" href="./mvp.css">
<link rel="stylesheet" href="./mobile.css">

<meta charset="utf-8">
<meta name="description" content="POLAR - documentation">
Expand Down
1 change: 1 addition & 0 deletions pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head>
<link rel="icon" href="./assets/iceberg_icon.svg">
<link rel="stylesheet" href="./mvp.css">
<link rel="stylesheet" href="./mobile.css">

<meta charset="utf-8">
<meta name="description" content="POLAR - the configurable map client factory">
Expand Down
6 changes: 6 additions & 0 deletions pages/mobile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* px determined by when the page starts to look wonky */
@media screen and (max-width: 650px) {
nav {
flex-direction: column;
}
}

0 comments on commit 3881419

Please sign in to comment.