Closed alongsang closed 1 year ago
Could you please share a small demo or example? I have a small demo, it doesnot work without any error. Here is the html:
<html>
<head>
<title>COMTiles MapLibre Example</title>
<meta charset="utf-8"/>
<script src="https://unpkg.com/maplibre-gl@2.1.7/dist/maplibre-gl.js"></script>
<link href="https://unpkg.com/maplibre-gl@2.1.7/dist/maplibre-gl.css" rel="stylesheet" />
<script type='text/javascript' src="../../../com-tiles-main/packages/maplibre-provider/dist/maplibreComtProvider.js"></script>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
console.log(comtiles);
const aa = new comtiles.MapLibreComtProvider
aa.register();
// comtiles.MapLibreComtProvider.register();
const map2 = new maplibregl.Map({
container: "map",
style: "https://gebase.oss-cn-beijing.aliyuncs.com/img/style.json",
center: [0, 0],
zoom: 0
});
</script>
</body>
</html>
Could you please give me any hint? Thanks!
the "@com-tiles/maplibre-provider" already support raster COMTiles, just run the demo with raster COMTiles