
Company News
Meet the Socket Team at RSAC and BSidesSF 2026
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.
mapbox.js
Advanced tools
A Mapbox plugin for Leaflet, a lightweight JavaScript library for traditional raster maps.
For the state-of-the-art Mapbox vector maps library, see Mapbox GL JS.
Managed as Markdown in API.md, following the standards in DOCUMENTING.md
Recommended usage is via the Mapbox CDN, with code snippets available on the official documentation page
The mapbox.js file includes the Leaflet library. Alternatively, you can use mapbox.standalone.js, which does not include Leaflet (you will have to provide it yourself).
See the API documentation and Examples for further help.
Install the mapbox.js module and add it to dependencies in package.json:
npm install mapbox.js --save
Require mapbox in your script:
// main.js
require('mapbox.js'); // <-- auto-attaches to window.L
Browserify it:
browserify main.js -o bundle.js
You can download a built release at the mapbox.js-bower repository.
Requires node.js installed on your system.
git clone https://github.com/mapbox/mapbox.js.git
cd mapbox.js
npm install
make
This project uses browserify to combine
dependencies and installs a local copy when you run npm install.
make will build the project in dist/.
Test with phantomjs:
npm test
To test in a browser, run a local development server
and go to /test.
Version v0.x.x can be accessed in the v0 branch..
Requirements:
inkscape
pngquant
theme/images/icons.svg../theme/images/render.sh to update sprites from your edits.Documentation is powered by Jekyll. Running using the following command:
./jekyll.sh
FAQs
Mapbox plugin for Leaflet
The npm package mapbox.js receives a total of 5,471 weekly downloads. As such, mapbox.js popularity was classified as popular.
We found that mapbox.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 44 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.

Research
/Security News
Malicious Packagist packages disguised as Laravel utilities install an encrypted PHP RAT via Composer dependencies, enabling remote access and C2 callbacks.

Research
/Security News
OpenVSX releases of Aqua Trivy 1.8.12 and 1.8.13 contained injected natural-language prompts that abuse local AI coding agents for system inspection and potential data exfiltration.