Skip to content

Commit

Permalink
Add leaflet
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxwellBo committed Oct 18, 2024
1 parent ed7cd84 commit cc515fc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,20 @@ <h3><a href="#tmg" id="tmg"></a>TeX, Markdown, Graphviz, Mermaid</h3>
});
</script>

<script type="module" class="echo reflect" id="leaflet" contenteditable="true">
celine.cell("leaflet", async function* () {
const L = await celine.library.L();
const container = htl.html`<div id="map" style="height: 300px;"></div>`;
yield container;

const map = L.map(container).setView([-33.8688, 151.2093], 13);

L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
});
</script>


<h2><a href="#libertine.css" id="libertine.css"></a>libertine.css</h2>

Expand Down

0 comments on commit cc515fc

Please sign in to comment.