Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Contributing

gilesc50 edited this page · 16 revisions

Mapstraction is for JavaScript developers, so many users are capable of making improvements to the code. The project was moved to github to make contributing easy, just join github, fork the project, and send a pull request containing your contributions:

  1. If you don’t have a github account, get one: Getting started with github
  2. Fork the mxn project as outlined in Forking a project.
  3. Create a branch to contain your contributions, and send a pull request from it.

If you’re not familiar with git, the Git User’s Manual is one place to start.

Formatting

We don’t have a coding style guide for the project but the main thing is to ensure you use tabs rather than spaces to indent your code and try to keep the structure of the code you add as close a possible to what’s already in the library. This helps readability and makes the job of the repo owner who merges your change in a lot easier.

Running the build script

Mapstraction now has a build process which you should ensure passes before you send a pull request. There are several steps however the crucial one is that it performs a JSLint on the code to ensure certain bad JavaScript constructs haven’t crept in. The JSLint not only forces some consistency in formatting but also removes quite a lot of possible bugs before they can occur. Some source code editors like Aptana Studio have JSLint built in so it’s worth checking if yours does and turning it on for editing the Mapstraction source and probably the rest of your JavaScript code as it’s a good set of rules to stick to.

JavaScript developers may not be familiar with Apache Ant, which is required to build the project. If you can install Ant in your development environment, you can run the build (build.xml) to make sure your changes don’t break it. That will help ensure that your pull requests are accepted. Simply navigating your command line to the folder with the build.xml file in and running ant from there should work.

Provider API Reference links

Something went wrong with that request. Please try again.