3.3.1 • Published 4 years ago

mapbox.js v3.3.1

Weekly downloads
5,367
License
BSD-3-Clause
Repository
github
Last release
4 years ago

mapbox.js

Build Status

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.

API

Managed as Markdown in API.md, following the standards in DOCUMENTING.md

Examples

Usage

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.

Usage with Browserify

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

Usage as Download

You can download a built release at the mapbox.js-bower repository.

Building

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/.

Tests

Test with phantomjs:

npm test

To test in a browser, run a local development server and go to /test.

Version v0.x.x

Version v0.x.x can be accessed in the v0 branch..

Editing Icons

Requirements:

inkscape
pngquant
  1. Make edits to theme/images/icons.svg.
  2. Run ./theme/images/render.sh to update sprites from your edits.
  3. Add a CSS reference with the appropriate pixel coordinate if adding a new icon.

Running documentation locally

Documentation is powered by Jekyll. Running using the following command:

./jekyll.sh
3.3.1

4 years ago

3.3.0

4 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.1

7 years ago

3.0.0

8 years ago

3.0.0-beta

8 years ago

1.6.7

8 years ago

2.4.0

8 years ago

2.3.0

8 years ago

1.6.6

8 years ago

2.2.4

8 years ago

2.2.3

9 years ago

2.2.2

9 years ago

2.2.1

9 years ago

2.2.0

9 years ago

2.1.9

9 years ago

2.1.8

9 years ago

1.6.5

9 years ago

2.1.7

9 years ago

2.1.6

9 years ago

2.1.5

9 years ago

2.1.4

10 years ago

2.1.3

10 years ago

2.1.2

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

2.0.0-beta1

10 years ago

2.0.0-beta0

10 years ago

1.6.4

10 years ago

1.6.3

10 years ago

1.6.2

10 years ago

1.6.2-beta0

10 years ago

1.6.1

10 years ago

1.0.0-alpha2

10 years ago

1.0.0-alpha1

10 years ago

1.0.0-alpha0

10 years ago

1.6.0

10 years ago

1.6.0-beta0

10 years ago

1.5.2

10 years ago

1.5.1

10 years ago

1.5.0

10 years ago

1.4.2

10 years ago

1.4.1

10 years ago

1.4.0

11 years ago

1.3.1

11 years ago

1.3.0

11 years ago

1.2.0

11 years ago

1.1.0

11 years ago

1.0.4

11 years ago

1.0.3

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago

1.0.0alpha2

11 years ago

1.0.0alpha1

11 years ago

1.0.0alpha0

11 years ago

0.6.7

11 years ago

0.6.7-dev

11 years ago

0.6.6

12 years ago

0.6.5

12 years ago

0.6.4-dev

12 years ago

0.6.4

12 years ago

0.6.3

12 years ago

0.6.0-dev

12 years ago

0.3.0

12 years ago

0.1.0

12 years ago