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
|
||||
<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>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>
|
||||
<pre><code class="language-html"><script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||
<link
|
||||
@@ -26,15 +26,15 @@
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</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>
|
||||
<script>
|
||||
const map = new maplibregl.Map({
|
||||
style: 'https://tiles.openfreemap.org/styles/liberty',
|
||||
center: [-0.114, 51.506],
|
||||
zoom: 14.2,
|
||||
container: 'map';
|
||||
})
|
||||
container: 'map'
|
||||
})
|
||||
</script>
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user