Setup Web
Include the following JavaScript and CSS files in the <head>
tag of
your web/index.html
file:
web/index.html
<!DOCTYPE html>
<html>
<head>
<!-- other html -->
<script src='https://unpkg.com/maplibre-gl@^5.0/dist/maplibre-gl.js'></script>
<link href='https://unpkg.com/maplibre-gl@^5.0/dist/maplibre-gl.css'
rel='stylesheet'/>
</head>
</html>
^5.0
ensures that your app will always use the latest version of
maplibre-gl-js version 5 but not
suddenly
use an incompatible version.
If you want to always use the latest version use latest
or use the full
version number like 5.0.0
if you want to use a specific version.
You can read about changes in maplibre-gl-js in the changelog file.