Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clusters #110

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Før brug skal man oprette en bruger på [Dataforsyningen](https://dataforsyning
1. Opret en bruger på [Dataforsyningen](https://www.dataforsyningen.dk)
2. Log ind på dataforsyningen.dk med din nye bruger, og opret en token.
3. Indsæt `<script>`-tag i `<head>`-tagget på din hjemmeside
- Benyt enten vores CDN: `<script src="https://okapi.dataforsyningen.dk/lib/okapi-1.8.1.min.js"
integrity="sha384-RPLkgOEZCcxhp4lTMZjilUnq/s8ykyNVFLJjkF71Rw7AUZBGseaESO9iAycwVt6p"
- Benyt enten vores CDN: `<script src="https://okapi.dataforsyningen.dk/lib/okapi-1.9.0.min.js"
integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn"
crossorigin="anonymous"></script>`
- Eller hav filen liggende på din egen server: `<script src="/path/to/okapi.min.js"></script>`
4. Indsæt `<div id="map" class="geomap" data-token="...">`-tag, dér hvor du vil have kortet.
Expand Down Expand Up @@ -73,22 +73,22 @@ F.eks. i dette tilfælde, hvor vi har bygget okapi ind i filerne `bundled.js` og
### CDN

```html
<script src="https://okapi.dataforsyningen.dk/lib/okapi-1.8.1.min.js"
integrity="sha384-RPLkgOEZCcxhp4lTMZjilUnq/s8ykyNVFLJjkF71Rw7AUZBGseaESO9iAycwVt6p"
<script src="https://okapi.dataforsyningen.dk/lib/okapi-1.9.0.min.js"
integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn"
crossorigin="anonymous"></script>
```

### Lokal kopi

Download filen: `https://okapi.dataforsyningen.dk/lib/okapi-1.8.1.min.js`
Download filen: `https://okapi.dataforsyningen.dk/lib/okapi-1.9.0.min.js`

```html
<script src="/path/to/okapi.js"></script>
```

### CSS

Vores standard styling kan findes her: `https://okapi.dataforsyningen.dk/lib/okapi-1.8.1.min.css`
Vores standard styling kan findes her: `https://okapi.dataforsyningen.dk/lib/okapi-1.9.0.min.css`

## Anvendelse

Expand Down
22 changes: 11 additions & 11 deletions dist/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions examples/advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<link href="./prism.css" rel="stylesheet">
<link href="./example.css" rel="stylesheet">

<link href="../lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.8.1.min.js"></script>
<link href="../lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.9.0.min.js"></script>

<script type="text/javascript" src="./clipboard.min.js"></script>
<script type="text/javascript" src="./prism.js"></script>
Expand Down Expand Up @@ -65,8 +65,8 @@
&lt;meta name="viewport" content="width=device-width,initial-scale=1.0">
&lt;title>Eksempel&lt;/title>

&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.js" integrity="sha384-RPLkgOEZCcxhp4lTMZjilUnq/s8ykyNVFLJjkF71Rw7AUZBGseaESO9iAycwVt6p" crossorigin="anonymous">&lt;/script>
&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
217 changes: 217 additions & 0 deletions examples/clusters.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@

<!DOCTYPE html>
<html lang="da" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Clusters</title>

<link rel="shortcut icon" href="./okapi-small.png">

<link href="./prism.css" rel="stylesheet">
<link href="./example.css" rel="stylesheet">

<link href="../lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.9.0.min.js"></script>

<script type="text/javascript" src="./clipboard.min.js"></script>
<script type="text/javascript" src="./prism.js"></script>

</head>
<body>
<main>
<span
class="geomarker"
data-type="marker"
data-title="Odense Zoo"
data-description="Vil du vide, hvad der sker på dagen for dit besøg?
Gå til dagsprogram og vælg dato for dit besøg i kalenderen. Så får du en liste over alle de aktiviteter, der sker i haven den dag.
</br>
</br>

<a class='link' href='https://www.odensezoo.dk/besoeg-zoo/program/' target='_blank'>Se dagsprogram</a>
"
data-address="Søndre Boulevard 306, 5000 Odense">
</span>
<span
class="geomarker"
data-type="marker"
data-title="Danmarks Jernbanemuseum"
data-description="På over 10.000 m2 finder du vogne og lokomotiver, busser, færgemodeller, modelbaner, legepladser. Alt i en autentisk jernbanebygning med sport og drejeskiver"
data-lat="55.402909"
data-lon="10.386536">
</span>
<span
class="geomarker"
data-type="marker"
data-title="Den Fynske Landsby"
data-description="På frilandsmuseet Den Fynske Landsby inviteres du indenfor i en fynsk landsby fra H.C. Andersens tid."
data-lat="55.366732"
data-lon="10.385352">
</span>
<span
class="geomarker"
data-type="marker"
data-title="Sortebro Kro"
data-description="Hvis du er fan af god service og velsmagende gourmet oplevelser kombineret med autentiske og ualmindelige charmerende omgivelser, så må du ikke gå glip af Sortebro Kro."
data-lat="55.366961"
data-lon="10.383845">
</span>

<div
id="map"
class="geomap"
data-type=""
data-center="auto"
data-zoom="6"
data-background="dtk_skaermkort_daempet"
data-mylocation="false"
data-fullscreen="false"
data-zoomslider="false"
data-layerswitcher="false"
data-token="fd44f26ab5701c01ca9f570e507fe9ab"
style="height: 400px;">
</div>

<!--
Udskift 'data-token=' med din egen token fra Dataforsyningen.
Hvis ikke du har en token så log ind på ’Min side’ https://www.dataforsyningen.dk/
Opret en token og brug den i din applikation
Token i dette eksempel er midlertidig og udelukkende til test brug.

English
Replace the 'data-token=' with your own token from the Danish map supply.
If you do not have a token please log in to "My page" https://www.dataforsyningen.dk/
Create a token and use it in your application
Token in this example is temporary and solely for test use.
-->

<script>
var maps = new okapi.Initialize({});
</script>
</main>
<aside>
<pre>
<code class="language-markup">

&lt;!DOCTYPE html>
&lt;html lang="da">
&lt;head>
&lt;meta charset="utf-8">
&lt;meta name="viewport" content="width=device-width,initial-scale=1.0">
&lt;title>Eksempel&lt;/title>

&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn" crossorigin="anonymous">&lt;/script>


&lt;/head>
&lt;body>
&lt;main>
&lt;span
class="geomarker"
data-type="marker"
data-title="Odense Zoo"
data-description="Vil du vide, hvad der sker på dagen for dit besøg?
Gå til dagsprogram og vælg dato for dit besøg i kalenderen. Så får du en liste over alle de aktiviteter, der sker i haven den dag.
&lt;/br>
&lt;/br>

&lt;a class='link' href='https://www.odensezoo.dk/besoeg-zoo/program/' target='_blank'>Se dagsprogram&lt;/a>
"
data-address="Søndre Boulevard 306, 5000 Odense">
&lt;/span>
&lt;span
class="geomarker"
data-type="marker"
data-title="Danmarks Jernbanemuseum"
data-description="På over 10.000 m2 finder du vogne og lokomotiver, busser, færgemodeller, modelbaner, legepladser. Alt i en autentisk jernbanebygning med sport og drejeskiver"
data-lat="55.402909"
data-lon="10.386536">
&lt;/span>
&lt;span
class="geomarker"
data-type="marker"
data-title="Den Fynske Landsby"
data-description="På frilandsmuseet Den Fynske Landsby inviteres du indenfor i en fynsk landsby fra H.C. Andersens tid."
data-lat="55.366732"
data-lon="10.385352">
&lt;/span>
&lt;span
class="geomarker"
data-type="marker"
data-title="Sortebro Kro"
data-description="Hvis du er fan af god service og velsmagende gourmet oplevelser kombineret med autentiske og ualmindelige charmerende omgivelser, så må du ikke gå glip af Sortebro Kro."
data-lat="55.366961"
data-lon="10.383845">
&lt;/span>

&lt;div
id="map"
class="geomap"
data-type=""
data-center="auto"
data-zoom="6"
data-background="dtk_skaermkort_daempet"
data-mylocation="false"
data-fullscreen="false"
data-zoomslider="false"
data-layerswitcher="false"
data-token="InsertYourTokenHere"
style="height: 400px;">
&lt;/div>

&lt;!--
Udskift 'data-token=' med din egen token fra Dataforsyningen.
Hvis ikke du har en token så log ind på ’Min side’ https://www.dataforsyningen.dk/
Opret en token og brug den i din applikation
Token i dette eksempel er midlertidig og udelukkende til test brug.

English
Replace the 'data-token=' with your own token from the Danish map supply.
If you do not have a token please log in to "My page" https://www.dataforsyningen.dk/
Create a token and use it in your application
Token in this example is temporary and solely for test use.
-->

&lt;script>
var maps = new okapi.Initialize({});
&lt;/script>
&lt;/main>
&lt;/body>
&lt;/html>

</code>
</pre>
<script>
(function(){
Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (env) {
var linkCopy = document.createElement('a');
linkCopy.textContent = ' Copy';

if (!ClipboardJS) {
callbacks.push(registerClipboard);
} else {
registerClipboard();
}

return linkCopy;

function registerClipboard() {
var clip = new ClipboardJS(linkCopy, {
'text': function () {
return env.code;
}
});


clip.on('success', function() {
linkCopy.textContent = ' Copied!';
});
}
});
})();
</script>
</aside>
</body>
</html>
8 changes: 4 additions & 4 deletions examples/custom-click.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<link href="./prism.css" rel="stylesheet">
<link href="./example.css" rel="stylesheet">

<link href="../lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.8.1.min.js"></script>
<link href="../lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.9.0.min.js"></script>

<script type="text/javascript" src="./clipboard.min.js"></script>
<script type="text/javascript" src="./prism.js"></script>
Expand Down Expand Up @@ -67,8 +67,8 @@
&lt;meta name="viewport" content="width=device-width,initial-scale=1.0">
&lt;title>Eksempel&lt;/title>

&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.js" integrity="sha384-RPLkgOEZCcxhp4lTMZjilUnq/s8ykyNVFLJjkF71Rw7AUZBGseaESO9iAycwVt6p" crossorigin="anonymous">&lt;/script>
&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
8 changes: 4 additions & 4 deletions examples/datafordeler.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<link href="./prism.css" rel="stylesheet">
<link href="./example.css" rel="stylesheet">

<link href="../lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.8.1.min.js"></script>
<link href="../lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.9.0.min.js"></script>

<script type="text/javascript" src="./clipboard.min.js"></script>
<script type="text/javascript" src="./prism.js"></script>
Expand Down Expand Up @@ -57,8 +57,8 @@
&lt;meta name="viewport" content="width=device-width,initial-scale=1.0">
&lt;title>Eksempel&lt;/title>

&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.js" integrity="sha384-RPLkgOEZCcxhp4lTMZjilUnq/s8ykyNVFLJjkF71Rw7AUZBGseaESO9iAycwVt6p" crossorigin="anonymous">&lt;/script>
&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
8 changes: 4 additions & 4 deletions examples/double.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<link href="./prism.css" rel="stylesheet">
<link href="./example.css" rel="stylesheet">

<link href="../lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.8.1.min.js"></script>
<link href="../lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.9.0.min.js"></script>

<script type="text/javascript" src="./clipboard.min.js"></script>
<script type="text/javascript" src="./prism.js"></script>
Expand Down Expand Up @@ -109,8 +109,8 @@
&lt;meta name="viewport" content="width=device-width,initial-scale=1.0">
&lt;title>Eksempel&lt;/title>

&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.js" integrity="sha384-RPLkgOEZCcxhp4lTMZjilUnq/s8ykyNVFLJjkF71Rw7AUZBGseaESO9iAycwVt6p" crossorigin="anonymous">&lt;/script>
&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
8 changes: 4 additions & 4 deletions examples/markers-advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<link href="./prism.css" rel="stylesheet">
<link href="./example.css" rel="stylesheet">

<link href="../lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.8.1.min.js"></script>
<link href="../lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.9.0.min.js"></script>

<script type="text/javascript" src="./clipboard.min.js"></script>
<script type="text/javascript" src="./prism.js"></script>
Expand Down Expand Up @@ -122,8 +122,8 @@
&lt;meta name="viewport" content="width=device-width,initial-scale=1.0">
&lt;title>Eksempel&lt;/title>

&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.js" integrity="sha384-RPLkgOEZCcxhp4lTMZjilUnq/s8ykyNVFLJjkF71Rw7AUZBGseaESO9iAycwVt6p" crossorigin="anonymous">&lt;/script>
&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
8 changes: 4 additions & 4 deletions examples/markers-simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<link href="./prism.css" rel="stylesheet">
<link href="./example.css" rel="stylesheet">

<link href="../lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.8.1.min.js"></script>
<link href="../lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
<script src="../lib/@dataforsyningen/okapi-1.9.0.min.js"></script>

<script type="text/javascript" src="./clipboard.min.js"></script>
<script type="text/javascript" src="./prism.js"></script>
Expand Down Expand Up @@ -63,8 +63,8 @@
&lt;meta name="viewport" content="width=device-width,initial-scale=1.0">
&lt;title>Eksempel&lt;/title>

&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.8.1.min.js" integrity="sha384-RPLkgOEZCcxhp4lTMZjilUnq/s8ykyNVFLJjkF71Rw7AUZBGseaESO9iAycwVt6p" crossorigin="anonymous">&lt;/script>
&lt;link href="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.css" rel="stylesheet">
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-PTMedOH2N55a0FfDQ168NixN7mF+o+T9iNOsExhg/2ef0DIc+7CBAXn8uTinZNcn" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
Loading
Loading