back to home

maplibre / maplibre-gl-inspect

Maplibre GL Inspect adds an inspect control to maplibre-gl-js to view all features of the vector sources and allows hovering over features to see their properties.

View on GitHub
65 stars
9 forks
2 issues

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing maplibre/maplibre-gl-inspect in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/maplibre/maplibre-gl-inspect)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Maplibre GL Inspect Maplibre GL Inspect is a fork of Mapbox GL Inspect by lukasmartinelli ( https://github.com/lukasmartinelli/mapbox-gl-inspect ). It was forked to add support for maplibre-gl-js. Add an inspect control to maplibre-gl-js to view all features of the vector sources and allows hovering over features to see their properties. **Requires maplibre-gl-js (min version 1.15).** Quick Start **maplibre-gl-inspect** is a Maplibre GL JS plugin that you can easily add on top of your map. Make sure to include the CSS and JS files. **When using a CDN** **When using modules** Documentation The docs can be found here: https://maplibre.org/maplibre-gl-inspect/ The docs have two main sections - the API and the examples. In order to see the examples' code either go to the examples folder in this repo, or press inspect in the browser to see the code. It is written in plain html, no extra javascript files in order to have it as simple as possible. Short Examples Add Inspect Control Add the inspect control to your map. Show Inspection Map Switch to the inspection map by default. Show only Inspection Mode Switch to the inspection map by default and hide the inspect button to switch back to the normal map. Check Disable Popup Disable the feature Popup in inspection mode and in map mode. Check Custom Popup Function You can also control the Popup output. Check Custom Color Function You are able to control the generated colors and background of the inspection style. Check and . Show just Popup but no Inspect Style You can also hide the inspect button and enable the popup on the map if just want the popup hovering feature in your normal map but no inspect style. Check . Show Popup only for certain Features You can pass a object structured like the parameters object documented for ](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/#queryrenderedfeatures). This let's you show the inspect popup for only certain layers. Check . You can also use this feature to do custom layer filtering. Less Fidly Popup If inspecting features is too fiddly for thin lines you can optionally set a custom pixel buffer around the pointer when querying for features to make inspection a bit more forgiving. Check . Show Popup only on Click not on Hovering Do not show the inspect popup when hovering over the map but only when clicking on the map. Check . Add a Callback for Inspect Toggle Events Call a function whenever the user toggles the inpect map on or off. Useful for adding inspect state to URL hash. Check . Develop To build the library: To see how it behaves This will start a local server, surf to it and to the folder to see changes in the code.