Skip to content

Instantly share code, notes, and snippets.

@smellman
Created May 29, 2023 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smellman/5a1ff75bd877eb62025c44a5cb0e75be to your computer and use it in GitHub Desktop.
Save smellman/5a1ff75bd877eb62025c44a5cb0e75be to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<link href='https://unpkg.com/maplibre-gl@3.0.0/dist/maplibre-gl.css' rel='stylesheet' />
<link
href="https://www.unpkg.com/@watergis/maplibre-gl-legend@latest/dist/maplibre-gl-legend.css"
rel="stylesheet"
/>
<title>WIP</title>
<script src='https://unpkg.com/maplibre-gl@3.0.0/dist/maplibre-gl.js'></script>
<script src="https://www.unpkg.com/@watergis/maplibre-gl-legend@latest/dist/maplibre-gl-legend.umd.js"></script>
<script>
console.log(MaplibreLegendControl); // OK
console.log(new MaplibreLegendControl({}, {
showDefault: false,
showCheckbox: false,
onlyRendered: true,
reverseOrder: true
})) // fail by MaplibreLegendControl is not a constructor
</script>
</head>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment