mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
grammar
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
Include
|
Include
|
||||||
<a href="https://maplibre.org/maplibre-gl-js/docs/" target="_blank">MapLibre GL JS</a> in the
|
<a href="https://maplibre.org/maplibre-gl-js/docs/" target="_blank">MapLibre GL JS</a> in the
|
||||||
<code><head></code>. If you are using npm, you can install the
|
<code><head></code>. If you are using npm, you can install the
|
||||||
<code>maplibre-gl</code> package, but make sure to load the CSS manually.
|
<code>maplibre-gl</code> package. Make sure to import the CSS as well.
|
||||||
</p>
|
</p>
|
||||||
<pre><code class="language-html"><script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
<pre><code class="language-html"><script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||||
<link
|
<link
|
||||||
@@ -26,15 +26,15 @@
|
|||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>And initialize it to a div, like this:</p>
|
<p>Initialize it to a div like this:</p>
|
||||||
<pre><code class="language-html"><div id="map" style="width: 100%; height: 500px"></div>
|
<pre><code class="language-html"><div id="map" style="width: 100%; height: 500px"></div>
|
||||||
<script>
|
<script>
|
||||||
const map = new maplibregl.Map({
|
const map = new maplibregl.Map({
|
||||||
style: 'https://tiles.openfreemap.org/styles/liberty',
|
style: 'https://tiles.openfreemap.org/styles/liberty',
|
||||||
center: [-0.114, 51.506],
|
center: [-0.114, 51.506],
|
||||||
zoom: 14.2,
|
zoom: 14.2,
|
||||||
container: 'map';
|
container: 'map'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user