You can use the MapLibre adapter to integrate MapWeave with MapLibre.
import { MapWeave } from "mapweave/maplibre";
export const mapweave = new MapWeave({
container: "mw",
options: {
// If no style is specified, MapWeave uses the MapLibre demo tiles by default.
style: "https://tiles.openfreemap.org/styles/bright",
},
}); <!doctype html>
<html>
<body>
<div id="mw"></div>
<script type="module" src="./code.js"></script>
</body>
</html> import React from "react";
import { createRoot } from "react-dom/client";
import { MapWeave } from "mapweave/react/maplibre";
const mapWeaveOptions = {
// If no style is specified, MapWeave uses the MapLibre demo tiles by default.
style: "https://tiles.openfreemap.org/styles/bright",
};
function Demo() {
return <MapWeave options={mapWeaveOptions} />;
}
const root = createRoot(document.getElementById("mw"));
root.render(<Demo />); <!doctype html>
<html>
<body>
<div id="mw"></div>
<script type="module" src="./code.jsx"></script>
</body>
</html>