GithubHelp home page GithubHelp logo

swac / mapbox.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mapbox/mapbox.js

0.0 2.0 0.0 12.62 MB

Mapbox JavaScript API, a Leaflet Plugin

Home Page: mapbox.com/mapbox.js/

License: Other

Makefile 0.39% Shell 0.91% JavaScript 39.87% HTML 51.11% PHP 1.29% CSS 6.43%

mapbox.js's Introduction

mapbox.js

Build Status Average time to resolve an issue

This is the Mapbox Javascript API, version 2.x. It's built as a Leaflet plugin. You can read about its launch.

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

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 with Bower

You can install mapbox.js with bower by running

bower install mapbox.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.

mapbox.js's People

Contributors

tmcw avatar jfirebaugh avatar tristen avatar ansis avatar heyitsgarrett avatar aaronlidman avatar lyzidiamond avatar tatsvc avatar katydecorah avatar samanpwbb avatar willwhite avatar who8mycakes avatar yhahn avatar alianthes avatar mourner avatar geografa avatar karenzshea avatar ingalls avatar lxbarth avatar zachbeattie avatar danswick avatar camilleanne avatar ianshward avatar sbma44 avatar alulsh avatar pdgoodman avatar mikemorris avatar edg2s avatar miccolis avatar incanus avatar

Watchers

Ashwin Bhat avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.