mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 22:12:15 +00:00
website
This commit is contained in:
@@ -4,17 +4,13 @@
|
||||
|
||||
<p>Choose a style:</p>
|
||||
<div class="button-container">
|
||||
<button onclick="selectStyle('bright')">Bright</button>
|
||||
<button onclick="selectStyle('liberty')">Liberty</button>
|
||||
<button onclick="selectStyle('positron')">Positron</button>
|
||||
<button onclick="selectStyle('bright')" class="btn">Bright</button>
|
||||
<button onclick="selectStyle('liberty')" class="btn">Liberty</button>
|
||||
<button onclick="selectStyle('positron')" class="btn">Positron</button>
|
||||
</div>
|
||||
|
||||
<p style="margin-bottom: 2em">
|
||||
Use the following style in a MapLibre map:
|
||||
<code id="style-url-code">
|
||||
<span>https://tiles.openfreemap.org</span><span>/styles</span><span>/liberty</span>
|
||||
</code>
|
||||
</p>
|
||||
<p>Use the following style in a MapLibre map:</p>
|
||||
<pre><code class="lang-uri">https://tiles.openfreemap.org/styles/liberty</code></pre>
|
||||
|
||||
<input type="checkbox" id="col1" class="col-chk" />
|
||||
<label for="col1" class="col-lbl">How to load MapLibre?</label>
|
||||
@@ -25,14 +21,14 @@
|
||||
<code><head></code>. If you are using npm, you can install the
|
||||
<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>
|
||||
<pre><code class="lang-html"><script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
|
||||
<link
|
||||
href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</code></pre>
|
||||
<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="lang-html"><div id="map" style="width: 100%; height: 500px"></div>
|
||||
<script>
|
||||
const map = new maplibregl.Map({
|
||||
style: 'https://tiles.openfreemap.org/styles/liberty',
|
||||
|
||||
Reference in New Issue
Block a user