mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
lint
This commit is contained in:
@@ -21,6 +21,7 @@ lint.select = [
|
|||||||
|
|
||||||
lint.ignore = [
|
lint.ignore = [
|
||||||
'A003',
|
'A003',
|
||||||
|
'DTZ007',
|
||||||
'E501',
|
'E501',
|
||||||
'E711',
|
'E711',
|
||||||
'E712',
|
'E712',
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Include the following links and scripts in your page:
|
|||||||
```html
|
```html
|
||||||
<!-- OpenLayers -->
|
<!-- OpenLayers -->
|
||||||
<script src="https://unpkg.com/ol/dist/ol.js"></script>
|
<script src="https://unpkg.com/ol/dist/ol.js"></script>
|
||||||
<link rel="stylesheet" href="https://unpkg.com/ol/ol.css">
|
<link rel="stylesheet" href="https://unpkg.com/ol/ol.css" />
|
||||||
|
|
||||||
<!-- ol-mapbox-style -->
|
<!-- ol-mapbox-style -->
|
||||||
<script src="https://unpkg.com/ol-mapbox-style/dist/olms.js"></script>
|
<script src="https://unpkg.com/ol-mapbox-style/dist/olms.js"></script>
|
||||||
@@ -18,12 +18,12 @@ Initialize it to a div like this:
|
|||||||
```html
|
```html
|
||||||
<div id="map" style="width: 100%; height: 500px"></div>
|
<div id="map" style="width: 100%; height: 500px"></div>
|
||||||
<script>
|
<script>
|
||||||
const openfreemap = new ol.layer.Group();
|
const openfreemap = new ol.layer.Group()
|
||||||
const map = new ol.Map({
|
const map = new ol.Map({
|
||||||
layers: [openfreemap],
|
layers: [openfreemap],
|
||||||
view: new ol.View({ center: ol.proj.fromLonLat([13.388, 52.517]), zoom: 9.5 }),
|
view: new ol.View({ center: ol.proj.fromLonLat([13.388, 52.517]), zoom: 9.5 }),
|
||||||
target: 'map'
|
target: 'map',
|
||||||
})
|
})
|
||||||
olms.apply(openfreemap, 'https://tiles.openfreemap.org/styles/liberty');
|
olms.apply(openfreemap, 'https://tiles.openfreemap.org/styles/liberty')
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user