You can report bugs on the project's issues tracker.
Before filing an issue, please make sure that your bug is not caused by Leaflet or your application code (e.g. passing incorrect arguments to methods, etc.). Second, search the already reported issues for similar cases, and if it's already reported, just add any additional details in the comments.
After you've made sure that you've found a new geocoder plugin bug, here are some tips for creating a helpful report that will make fixing it much easier and quicker:
- Write a descriptive, specific title. Bad: Problem with search. Good: Searching for X in IE9 causes Z.
- Include browser, OS and Leaflet version info in the description.
- Check whether the bug can be reproduced in other browsers.
- Bonus: create a simple test case that demonstrates the bug (e.g. using JSFiddle or JS Bin).
If you just want some help with your project, try asking in our Gitter chatroom instead.
We're happy to accept pull requests and patches for this plugin. Below are some guidelines for making sure the geocoder plugin is high quality and useful for everyone.
- Keep it simple. Bugfixes, performance optimizations and small improvements that don't add a lot of code are much more likely to get accepted quickly.
- Before adding a new feature, ask yourself whether this important enough to be required for everyone. Will a different third-party application developer need different assumptions?
- Whenever possible, follow the Leaflet plugin authoring guide. Use Leaflet syntax to make it more comfortable for map developers to stay in a "Leaflet mental model." (e.g.
bounds
instead of the Pelias-equivalent termbbox
.)
Additionally, we would greatly appreciate it if pull requests and improvements also included corresponding tests and documentation updates.
There is not currently a build system for the code. The plugin's JavaScript and CSS are written as single files in the dist
folder. This may change in the future if the project becomes more complex or if it is preferred by our users.
Code style is enforced by Flet's SemiStandard Javascript Style. One noticeable difference from Leaflet's code style is that the library uses spaces for indentation as opposed to tabs.
Please run tests before making a pull request. We also use CircleCI to run tests on each commit and pull request, and we will only accept pull requests that pass.
Tests are still a work in progress and coverage is low so just because tests pass does not ensure 100% compatibility yet.
Our testing infrastructure is the same as Leaflet core. It uses Node, and the Jake Javascript build tool. To set up the test system, install Node, then install project dependencies from npm into the project root:
npm install
To run the tests from the command line:
npm test
To run the tests in a browser manually, open spec/index.html
.
This plugin uses Semantic Versioning.
Before publishing a package, follow each of these steps:
- Increment the version number
- Update
bower.json
- Update the
VERSION
variable insrc/core.js
- Update
- Update
CHANGELOG.md
with the correct version number and release date - Update all demos and documentation with the latest version number
- Double check dependencies and update those that need updating
- Run tests and ensure that they are passing
- Run
npm version <major|minor|patch>
to update the version inpackage.json
. This also automatically creates a version commit and tag. - Run
git push
andgit push --tags
to push everything upstream. - In GitHub, go to tags and add release notes with the version number, date, and change log. You should be able to duplicate this from
CHANGELOG.md
. Then publish this as the latest release. - Run
npm publish
to make sure that the package is correctly compiled for npm. - It can take up to 24 hours for the package to be hosted on cdnjs.
Currently, documentation is in the form of short, simple examples in README.md. If there is a something that would benefit from a real world example, please drop a one-file example page into the examples
folder.
Examples should be short and demonstrate one thing at a time.
Thanks so much for contributing to the Mapzen Search / Pelias geocoder plugin for Leaflet. We, and future generations of map enthusiasts, thank you. 🖖