-
Notifications
You must be signed in to change notification settings - Fork 355
ProGuide Contribute Samples
This wiki provides guidelines on how to contribute ArcGIS Pro Add-in Samples that can be added to the arcgis-pro-sdk-community-samples repository.
To contribute samples, it is recommended to have some background on Git and GitHub.
Language: C# and Visual Basic
Subject: Framework
Contributor: ArcGIS Pro SDK Team <[email protected]>
Organization: Esri, http://www.esri.com
Date: 06/27/2019
ArcGIS Pro: 2.5
Visual Studio: 2017, 2019
If you wish to contribute to this website, please fork it on GitHub, push your sample to a named branch, then send a pull request. Please ensure all class files have triple slash comments and you have added the copyright header. Step by step instructions can be found below.
- Download the ArcGIS Pro SDK from here
- If you do not have one already, create an account on https://github.com/
- Download and install Git SCM from http://git-scm.com/. (Note: Command line examples explained below use the Git Bash shell included with Git SCM.)
Fork
this repository to make a copy of it in your account on GitHub.
From this repo, click the button at the top right corner. If prompted, select the location where you want to Fork to.
Clone
your fork. This copies the contents of your fork to a location on your machine.
$ cd <local-path>
$ git clone <Git SSH URL for the contributing-to-pro repo your forked>
Copy the URL to your clipboard using the copy button located in the bottom right of this repo.
Create a Branch
.
$cd arcgis-pro-sdk-community-samples
$git branch <username>/<add-in-name>
Recommended naming convention for the branch is <username>/<add-in-name>. Avoid using spaces or other special characters. / is allowed to differentiate between parts of the branch name.
Checkout
your branch.
$git checkout <username>/<add-in-name>
You can accomplish both creating and checking out your branch with a single step in git:
$git checkout -b <username>/<add-in-name>
a. Open Visual Studio. Create a new ArcGIS Pro Module Add-in Project using the ArcGIS Pro SDK for .NET Project Templates. See Developing with ArcGIS Pro: Getting Started for help. The project should reside in the appropriate ArcGIS Pro Topic folder in the cloned folder created in step 2.
If you already have an ArcGIS Pro Add-In, then open this project in Visual Studio.
b. Turn on the XML Documentation for your sample. You can do that here in the project properties:
Right click the project node and select Properties
from the context menu choices. In the project Properties dialog, select the Build
tab and turn on XML Documentation File
checkbox.
Add triple slash comments for the Module class in your sample. At a minimum, the Summary
tag should explain the purpose of the sample. Additionally, the Remarks
tag can be filled with some extra information that you want to share about the sample. The triple slash comments for the Module class is used by an automated tool to create a markdown face page after your sample submission has been accepted.
/// <summary>
/// This sample provides a new tab and controls that allow you to set the
///time in the map view, step through time, and navigate between time
///enabled bookmarks in the map.
/// </summary>
/// <remarks>
///1. In Visual Studio click the Build menu. Then select Build Solution.
///2. Click Start button to open ArcGIS Pro.
///3. ArcGIS Pro will open.
///4. Open a map view that contains time aware data. Click on the new
///Navigation tab within the
///Time tab group on the ribbon.
///![UI](screenshots/UICommands.png)
///6. Within this tab there are 3 groups that provide functionality to
///navigate through time.
///7. The Map Time group provides two date picker controls to set the
///start and end time in the map.
///8. The Time Step group provides two combo boxes to set the time step
///interval. The previous and next
///button can be used to offset the map time forward or back by the
///specified time step interval.
///9.. The Bookmarks group provides a gallery of time enabled bookmarks
///for the map. Clicking a bookmark in the
///gallery will zoom the map to that location and time.
///It also provides play, previous and next buttons that can be used to
///navigate between the time enabled bookmarks.
///These commands are only enabled when there are at least 2 bookmarks
///in the map. Finally it provides a
///slider that can be used to set how quickly to move between
///bookmarks during playback.
/// </remarks>
internal class TimeModule : Module
{..
Provide a triple slash header for all the classes in your sample. This will help others understand your sample better.
Ideally, you should triple slash comment everything. Remember, others will be reading your comments to understand the purpose of your code.
Open the Config.daml file. Complete the metadata section at the top of this file.
<AddInInfo id="{57f1bfc8-4ec8-4178-9000-2a7d2b956cea}" version="1.0"
desktopVersion="2.4.3000">
<Name>Time Navigation</Name>
<Subject>Map Exploration</Subject>
<Description>Adds additional controls to navigate through time.</Description>
<Image>Images\AddinDesktop32.png</Image>
<Author>ArcGIS Pro SDK Team</Author>
<Company>Esri</Company>
<Date>9/3/2014 4:45:39 PM, 2014</Date>
</AddInInfo>
Add this exact Copyright header to the top of every source file:
// Copyright 2019 Esri
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
' Copyright 2019 Esri
' Licensed under the Apache License, Version 2.0 (the "License");
' you may not use this file except in compliance with the License.
' You may obtain a copy of the License at
' http://www.apache.org/licenses/LICENSE-2.0
' Unless required by applicable law or agreed to in writing, software
' distributed under the License is distributed on an "AS IS" BASIS,
' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
' See the License for the specific language governing permissions and
' limitations under the License.
Compile and run your sample to test it with ArcGIS Pro.
Stage
and Commit
your changes to your local branch.
$git add --all
$git commit -m "Comment describing change"
Push
your branch to your remote repository on GitHub.
git push origin <username>/<add-in-name>
Submit a pull request. The ArcGIS Pro SDK team will process the pull request.
In your repository on GitHub.com, select your branch. Click the link to make a pull request to allow the ArcGIS Pro SDK Team aware of your contribution. We will collaborate on the pull request.
Home | API Reference | Requirements | Download | Samples