Map of the World API was developed at the National Geospatial-Intelligence Agency in collaboration with Booz Allen Hamilton. The government has "unlimited rights" and is releasing this software to increase the impact of government investments by providing developers with the opportunity to take things in new directions. The software use, modification, and distribution rights are stipulated within the Apache 2.0 license.
All pull request contributions to this project will be released under the Apache 2.0 or compatible license. Software source code previously released under an open source license and then modified by NGA staff is considered a "joint work" (see 17 USC � 101); it is partially copyrighted, partially public domain, and as a whole is protected by the copyrights of the non-government authors and must be released according to the terms of the original open source license.
- This Map API supports multiple web-based mapping libraries and provides a consistent set of methods for interacting with any of the supported implementations.
- Currently OpenLayers 2 and Leaflet are supported.
- Support for OpenLayers 3 is coming soon!
- It is highly encouraged that developers follow the conventions described in the following two JavaScript style guides: (1) airbnb (2) idiomatic.js
- The development team uses Grunt to manage builds
- The build process lints JavaScript source files via JSHint + JSCS and generates API documentation via JSDoc
- JavaScript source files are bundled into a single file for distribution via Browserify and minified using Uglify
- NightwatchJS + Selenium are used for automated end-to-end tests
- New functionality must be developed in a descriptively named feature branch and code reviewed prior to being merged into the 'master' branch
- A zip file of the Map API documentation is available for those that wish to review the documentation prior to building the project themselves.
- Some of the commands below may require
sudo
(or equivalent) depending on the operating system. - If you work on site at an organization with restrictive network policies (such as blocking SSH on port 22), you may need to tell Git to replace the Git protocol with HTTPS via
git config --global url."https://".insteadOf git://
- Install NodeJS
- Install Grunt
npm install -g grunt-cli
- Install dependencies via
npm install
(see package.json for configuration) - Download standalone version of Selenium, which can be found here
- Edit
testConfig.json
for your local environmentseleniumJarLocation
should point to the location of the Standalone Selenium JAR (which you just downloaded in #4) on your local filesystemseleniumHost
should point to the host of the selenium instance (most likely localhost)seleniumPort
defines the port that selenium listens on (selenium default is 4444)localExpressServerPort
defines the port that the local express server listens on (default is 3000)
- Perform build via
grunt
(see Gruntfile.js for alternative build tasks and configurations)
demo/
- contains simple HTML page (and other required dependencies) to demonstrate API functionalitydev/
- contains HTML container(s) useful during development and debuggingdist/
- contains resources that are copied/generated during the build processgrunt
- contains modules for each Grunt taskjs/
js/app/
- contains all API source codejs/assets/
- contains third-party dependencies not available via npm (manually managed)
tests/
- contains NightwatchJS testsGruntfile.js
- build script containing various build tasks and configurationsLICENSE
- Apache 2.0 LicenseNOTICE
- Apache 2.0 License HeaderREADME.me
- development documentationapi-usage-examples.md
- API usage guidelines with examplesdistributions.json
- file names of various distributions produced by buildjscs.json
- JavaScript code style validation rulesjsdoc.conf.json
- configures the formatting of JSDoc outputlint.json
- configures the locations of source files to be lintednpm-shrinkwrap.json
- locks down specific dependency versions, update vianpm shrinkwrap
after adding a new dependencypackage.json
- project configuration and dependency definitionsserver.js
- rudimentary ExpressJS server used to host local resources for end-to-end test executiontestConfig.json
- contains properies related to the configuration of the test environment