Extends Leaflet to include functionality and a look-and-feel built specifically for the National Park Service.
This library is under very active development, so please help test and report issues.
You may also want to take a look at the NPMap Builder. It is a graphical interface that walks through building a map with NPMap.js.
Heavily inspired (cough cough) by Mapbox.js, and, of course, built on the great Leaflet library. Standing on the shoulders of giants. Also, many thanks to the authors of all the great plugins used in/by the library (take a look at LICENSE.md for a list).
NPMap.js is versioned using semantic versioining. This means that releases are numbered:
major.minor.patch and follow these guidelines:
- Breaking backward compatibility bumps the major (and resets the minor and patch to zero)
- New additions that don't break backward compatibility bumps the minor (and resets the patch to zero)
- Bug fixes and miscellaneous changes bumps the patch
- v2.0.0: Under Development
NPMap.js is hosted on the National Park Service's content delivery network. Feel free to load the library directly from there. You can access hosted versions at http://www.nps.gov/npmap/npmap.js/major.minor.patch/npmap-bootstrap.min.js. You should replace "major.minor.patch" with the number of the version you want to access (e.g. 2.0.0).
You can pull in a recent copy of the
master branch from http://www.nps.gov/npmap/npmap.js/latest/npmap-bootstrap.min.js. This should not, however, be used in production maps, as this branch is under active development and may be unstable at times.
You must have node.js installed to run the build. After installing node.js:
git clone https://github.com/nationalparkservice/npmap.js cd npmap.js npm install
Install the Grunt command line tool (do this once as an admin user after installing node.js):
npm install -g grunt-cli
Copy secrets.sample.json to a file called secrets.json for development and testing:
cp secrets.sample.json secrets.json
Then use Grunt to build the library:
Internally, the Grunt task uses browserify to combine dependencies. It is installed locally, along with other required packages, when you run
npm install. The build task also uses uglify and cssmin to create minified versions in
We are working to expand test coverage for the library.
Take a look at API.md.
Simple and targeted examples reside in the
examples directory. This is a great starting point if you haven't used NPMap.js before.