| <!DOCTYPE html> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to you under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Security-Policy" content=" |
| default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org https://tile.openstreetmap.org; |
| script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org 'unsafe-inline'; |
| worker-src 'self' blob:; |
| child-src 'self' blob:; |
| img-src 'self' data: blob: http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org; |
| style-src 'self' 'unsafe-inline' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org; |
| "> |
| |
| <script src="https://unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.js" integrity="sha256-VkgYz8vlPsIndJcxwEDZKAdx4r+Ag7HcLBPP4UbJrZE=" crossorigin="anonymous"></script> |
| <script src="https://baremaps.apache.org/assets/maplibre/maplibre-gl-inspect.js" integrity="sha256-NYdRoIbqeAWkTHjpa/BukMLXcsiqFoDuJCYzzaRei30=" crossorigin="anonymous"></script> |
| <script src="https://baremaps.apache.org/assets/maplibre/maplibre-gl-tile-boundaries.js" integrity="sha256-Jo8NvxMzooqayU8+eIsjO49b4EoakoE0o0tSSrBWPCU=" crossorigin="anonymous"></script> |
| <script src="https://baremaps.apache.org/assets/maplibre/maplibre-custom-controls.js" integrity="sha256-80a3VIbp5OJ8HSIWJ7+6NjTvdBmVirLCR6otKucXnlw=" crossorigin="anonymous"></script> |
| <script src="https://baremaps.apache.org/assets/maplibre/maplibre-gl-framerate.js" integrity="sha256-6IVzv2heNDAl7KkSqjRkmjr56asfkdCxO2q8ouTo8t8=" crossorigin="anonymous"></script> |
| <link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.css" integrity="sha256-eSrJl9z2rm9kPrTi3uRjDIXnBWUmvY+4X/6Dxn1sQbQ=" crossorigin="anonymous"> |
| <link rel="stylesheet" href="https://baremaps.apache.org/assets/maplibre/maplibre-gl-inspect.css" integrity="sha256-ePhsoaklgbCBxK7kfSUcP+V+bVqnfFwpILz7hkSR0Lo=" crossorigin="anonymous"> |
| <link rel="stylesheet" href="https://baremaps.apache.org/assets/maplibre/maplibre-gl-tile-boundaries.css" integrity="sha256-FxIRliWXnU67sT1i97MgNQ0qL8LjsgYiBH9v/uNxzdM=" crossorigin="anonymous"> |
| <link rel="stylesheet" href="https://baremaps.apache.org/assets/maplibre/maplibre-custom-controls.css" integrity="sha256-rFc19qrZTPgcrNeYjtsLCcDOqM5NrLiPy2U+0FxW9vA=" crossorigin="anonymous"> |
| <link rel="icon" type="image/x-icon" href="https://baremaps.apache.org/assets/favicon/favicon.ico"> |
| <style> |
| |
| body { |
| margin: 0; |
| } |
| |
| #map { |
| position: fixed; |
| width: 100%; |
| height: 100%; |
| } |
| |
| </style> |
| <title>Baremaps</title> |
| </head> |
| <body> |
| <div id="map"></div> |
| <script> |
| |
| // Load the right-to-left plugin if necessary. |
| if (maplibregl.getRTLTextPluginStatus() === 'unavailable') { |
| maplibregl.setRTLTextPlugin( |
| 'https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js', |
| null, |
| true |
| ); |
| } |
| |
| // Initialize the map |
| let map = new maplibregl.Map({ |
| container: 'map', |
| style: '/style.json', |
| hash: true |
| }); |
| |
| |
| // Add the navigation control to the map |
| map.addControl(new maplibregl.NavigationControl()); |
| |
| // Add the inspect control to the map |
| map.addControl(new MaplibreInspect({ |
| showMapPopup: true, |
| showMapPopupOnHover: false, |
| showInspectMapPopupOnHover: false, |
| popup: new maplibregl.Popup({ |
| closeButton: true, |
| closeOnClick: true, |
| maxWidth: 'none' |
| }) |
| })); |
| |
| // Add the tile boundaries control to the map |
| map.addControl(new MaplibreTileBoundaries({ |
| showBoundaries: false |
| })); |
| |
| </script> |
| </body> |
| </html> |