Leaflet/README.md

33 lines
2.7 KiB
Markdown
Raw Normal View History

2011-05-19 21:01:51 +08:00
<img src="http://leaflet.cloudmade.com/docs/images/logo.png" alt="Leaflet" />
2011-05-19 20:55:53 +08:00
2012-04-12 12:24:40 +08:00
Leaflet is a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps, developed by [CloudMade](http://cloudmade.com) to form the core of its next generation JavaScript API. Weighting just about 21kb of gzipped JS code, it still has all the [features](http://leaflet.cloudmade.com/features.html) you will ever need for your web mapping needs while providing a fast, smooth, pleasant user experience.
2010-09-23 16:57:14 +08:00
2012-02-22 00:36:39 +08:00
It is built from the ground up to work efficiently and smoothly on both desktop and mobile platforms like iOS and Android, utilizing cutting-edge technologies included in HTML5 and CSS3, focusing on usability, performance, small size, [A-grade](http://developer.yahoo.com/yui/articles/gbs/) browser support, flexibility and [easy to use API](http://leaflet.cloudmade.com/reference.html). The OOP-based code of the library is designed to be modular, extensible and very easy to understand.
2010-09-23 16:57:14 +08:00
2011-04-11 17:17:40 +08:00
Check out the website for more information: [leaflet.cloudmade.com](http://leaflet.cloudmade.com)
2011-01-12 17:43:36 +08:00
2011-04-08 17:10:27 +08:00
## Contributing to Leaflet
2012-02-22 00:36:39 +08:00
Let's make the best open-source library for maps that can possibly exist!
2011-12-13 03:48:20 +08:00
Contributing is simple: make the changes in your fork, make sure that Leaflet builds successfully (see below) and then create a pull request to [Vladimir Agafonkin](http://github.com/mourner) (Leaflet maintainer). Updates to Leaflet [documentation](http://leaflet.cloudmade.com/reference.html) and [examples](http://leaflet.cloudmade.com/examples.html) (located in the `gh-pages` branch) are really appreciated too.
Here's [a list of the awesome people](http://github.com/CloudMade/Leaflet/contributors) that joined us already. Looking forward to _your_ contributions!
## Building Leaflet
Leaflet build system is powered by the Node.js platform and Jake, JSHint and UglifyJS libraries, which install easily and work well across all major platforms. Here are the steps to install it:
1. [Download and install Node](http://nodejs.org)
2. Run the following commands in the command line:
2012-02-22 00:36:39 +08:00
2011-12-13 03:48:20 +08:00
```
npm install -g jake
npm install jshint
npm install uglify-js
2011-12-13 03:48:20 +08:00
```
Now that you have everything installed, run `jake` inside the Leaflet directory. This will check Leaflet source files for JavaScript errors and inconsistencies, and then combine and compress it to the `dist` folder.
To make a custom build of the library with only the things you need, use the build helper (`build/build.html`) to choose the components (it figures out dependencies for you) and then run the command generated with it.
2012-02-22 00:36:39 +08:00
If you add any new files to the Leaflet source, make sure to also add them to `build/deps.js` so that the build system knows about them. Happy coding!