Skip to content
Mike Branscomb edited this page Oct 24, 2024 · 6 revisions

Esri welcomes contributions to our open source projects on Github. Please see our guidelines for contributing.

We do not currently accept new PRs for full features (e.g. a new sample or a significant change to the sample viewers) but we encourage you to submit issues for:

  • Bugs you find while using the samples.
  • Enhancement requests for new code samples or new functionality in the sample viewers.

Contributing to samples for the ArcGIS Maps SDK for .NET

This guide describes how you can contribute improvements to source code.

  1. Make sure you have a GitHub account.
  2. To add an enhancement or fix a problem, first create a new issue.
    • Be descriptive. Clearly describe the issue including steps to reproduce and, if possible, an example reproducer.
    • If submitting an enhancement, clearly describe the additional functionality and provide a good use case to support it.
  3. Fork the ArcGIS Maps SDK for .NET Samples repo on GitHub.
  4. Clone it to your local machine.
  5. Checkout the main branch.
  6. Create a new feature branch on your local machine. The name of the branch is not important.
  7. Write code to add an enhancement or fix a problem.
    • Follow the coding conventions already used in the source code.
    • Document your code.
    • Make commits of logical units.
    • Use clear and descriptive commit messages.
  8. Test your code.

Submitting changes

  1. Push the changes in your feature branch to your repo.
  2. Submit a pull request against the main branch.
  3. In the pull request comments, add a reference to the issue the pull request resolves. For example, if the pull request resolves issue 45, add a comment to the pull request that includes "#45" (no quotes).

Code reviews

Be prepared to receive substantial feedback on any pull request. Each pull request will undergo thorough review and testing, and may be rejected for various reasons. If a pull request is rejected due to potential breaking changes or features that fall outside the project scope, it will be closed permanently. However, if it is rejected because the proposed changes did not pass code review or testing, please carefully review the feedback, make the necessary fixes, and reopen the pull request as needed.

Offline Data

If your sample requires offline data (such as a tile package or mobile map package in local storage), this will need to be added to an ArcGIS Online portal. Each sample viewer includes a DataManager class to facilitate a consistent approach to managing offline data. The steps for adding offline data to a sample are as follows:

  • Update the sample .xaml.cs file with the OfflineData attribute, with any data items referenced by your sample.
  • Update your code to:
    • Check for the existence of the desired file (by name) in local storage (System.IO.File.Exists(path))
    • Download the file if not already present (GetData static method on the data manager)
    • Pass the path to the file in local storage

For an example of a sample using offline data, see Open Mobile Map (map package), located under the "map" category.

License

By contributing your code, you agree to license your contribution under the terms of the Apache License, Version 2.0.

Your contributions should be an original work of authorship by you, including any modifications or additions to an existing work, that is intentionally submitted for inclusion in this repo. Contributions that require an additional third-party license or have other restrictions (including, but not limited to, related patents and trademarks) will be rejected.