| <!DOCTYPE html> |
| <!-- |
| Licensed 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> |
| <head> |
| <script src='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js'></script> |
| <script src='/maplibre-gl-inspect.js'></script> |
| <script src='/maplibre-gl-tile-boundaries.js'></script> |
| <link href='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css' rel='stylesheet' /> |
| <link href='/maplibre-gl-inspect.css' rel='stylesheet' /> |
| <link href='/maplibre-gl-tile-boundaries.css' rel='stylesheet' /> |
| <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 |
| }) |
| })); |
| |
| // Add the tile boundaries control to the map |
| map.addControl(new MaplibreTileBoundaries({ |
| showBoundaries: false |
| })); |
| |
| </script> |
| </body> |
| </html> |