Skip to content

Commit

Permalink
fix autocenter
Browse files Browse the repository at this point in the history
  • Loading branch information
Gebuz committed Jul 28, 2023
1 parent f7ce6f8 commit 5bcecd5
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 45 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Før brug skal man oprette en bruger på [Dataforsyningen](https://dataforsyning
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.9.0.min.js"
integrity="sha384-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX"
integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w"
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 @@ -74,7 +74,7 @@ F.eks. i dette tilfælde, hvor vi har bygget okapi ind i filerne `bundled.js` og

```html
<script src="https://okapi.dataforsyningen.dk/lib/okapi-1.9.0.min.js"
integrity="sha384-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX"
integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w"
crossorigin="anonymous"></script>
```

Expand Down
24 changes: 12 additions & 12 deletions dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/clusters.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-click.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/datafordeler.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/double.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/markers-advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/markers-simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/overlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
2 changes: 1 addition & 1 deletion examples/tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
&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-zq4C9oz8NlF7XtspFwTSVomHSC2Ta1VIuAqbR8WBL4Vk+jJBgUr3fGIjLq3aL5JX" crossorigin="anonymous">&lt;/script>
&lt;script src="https://okapi.dataforsyningen.dk/lib/@dataforsyningen/okapi-1.9.0.min.js" integrity="sha384-XmYNgRneJEqyNaWTNh2H4xUIBaXotqwM4UBOqZd6hycbalTa7NZao0Rfm0+QOY8w" crossorigin="anonymous">&lt;/script>


&lt;/head>
Expand Down
24 changes: 12 additions & 12 deletions lib/@dataforsyningen/okapi-1.9.0.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/@dataforsyningen/okapi-1.9.0.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"dependencies": {
"axios": "^0.21.4",
"ol": "^7.3.0",
"ol": "^7.4.0",
"proj4": "^2.7.5"
}
}
2 changes: 1 addition & 1 deletion src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export default class Map {
const extent = createEmpty()

this.markerLayers.forEach(function (layer) {
extend(extent, layer.getSource().getExtent())
extend(extent, layer.getSource().getSource().getExtent())
})
if (extent[0] === Infinity) {
return
Expand Down

0 comments on commit 5bcecd5

Please sign in to comment.