├── .gitattributes ├── .gitignore ├── LICENSE ├── ProAddins.sln ├── ProAddins ├── Backup-2.x.zip ├── ClearDefExprButton.cs ├── Config.daml ├── DarkImages │ ├── Thumbs.db │ ├── home.png │ ├── streetview.png │ └── streetview16.png ├── ExternalViewerButton.cs ├── ExternalViewerSettingsView.xaml ├── ExternalViewerSettingsView.xaml.cs ├── ExternalViewerSettingsViewModel.cs ├── Images │ ├── Thumbs.db │ ├── home.png │ ├── streetview.png │ └── streetview16.png ├── Migration-2025-01-31_11-36-32.html ├── Migration-2025-01-31_11-36-32.txt ├── OpenStreetviewTool.cs ├── Pro.cs ├── ProAddins.csproj ├── ProAddins.csproj.bak ├── Properties │ ├── AssemblyInfo.cs │ └── launchSettings.json ├── SetDefExprButton.cs ├── Settings.Designer.cs ├── Settings.settings ├── app.config └── packages.config ├── README.md └── images ├── Thumbs.db ├── select.gif └── streetview.gif /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Gregg Roemhildt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProAddins.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26430.14 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProAddins", "ProAddins\ProAddins.csproj", "{7E497630-98EC-4355-A32B-4CEDC42F008D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {7E497630-98EC-4355-A32B-4CEDC42F008D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {7E497630-98EC-4355-A32B-4CEDC42F008D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {7E497630-98EC-4355-A32B-4CEDC42F008D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {7E497630-98EC-4355-A32B-4CEDC42F008D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /ProAddins/Backup-2.x.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/Backup-2.x.zip -------------------------------------------------------------------------------- /ProAddins/ClearDefExprButton.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | using ArcGIS.Desktop.Framework.Contracts; 4 | using ArcGIS.Desktop.Mapping; 5 | using ArcGIS.Desktop.Framework.Threading.Tasks; 6 | 7 | namespace ProAddins 8 | { 9 | internal class ClearDefExprButton : Button 10 | { 11 | protected override void OnClick() 12 | { 13 | FeatureLayer layer = (FeatureLayer)MapView.Active.GetSelectedLayers().OfType().FirstOrDefault(); 14 | if (layer == null) return; 15 | this.SetDefinitionQueryAsync(layer); 16 | } 17 | 18 | // 19 | // sets the definition query on a layer asynchronously 20 | // 21 | // 22 | protected Task SetDefinitionQueryAsync(FeatureLayer layer) 23 | { 24 | return QueuedTask.Run(() => 25 | { 26 | layer.SetDefinitionQuery(""); 27 | }); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ProAddins/Config.daml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ProAddins 5 | ProAddins description 6 | Images\AddinDesktop32.png 7 | groemhildt 8 | Microsoft 9 | 6/28/2017 7:46:28 AM, 2017 10 | Framework 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 40 | 44 | 45 | Opens Google Streetview when the map is clicked. 46 | 47 | 48 | Opens Parcel Viewer Application when you click on a parcel 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /ProAddins/DarkImages/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/DarkImages/Thumbs.db -------------------------------------------------------------------------------- /ProAddins/DarkImages/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/DarkImages/home.png -------------------------------------------------------------------------------- /ProAddins/DarkImages/streetview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/DarkImages/streetview.png -------------------------------------------------------------------------------- /ProAddins/DarkImages/streetview16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/DarkImages/streetview16.png -------------------------------------------------------------------------------- /ProAddins/ExternalViewerButton.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using System.Diagnostics; 3 | using ArcGIS.Desktop.Mapping; 4 | using ArcGIS.Desktop.Framework.Threading.Tasks; 5 | using System.Collections.Generic; 6 | using ArcGIS.Core.Data; 7 | using System; 8 | using ArcGIS.Desktop.Framework.Dialogs; 9 | 10 | 11 | namespace ProAddins 12 | { 13 | internal class ExternalViewerButton : MapTool 14 | { 15 | protected override void OnToolMouseDown(MapViewMouseButtonEventArgs e) 16 | { 17 | if (e.ChangedButton == System.Windows.Input.MouseButton.Left) 18 | e.Handled = true; //Handle the event args to get the call to the corresponding async method 19 | } 20 | 21 | protected override Task HandleMouseDownAsync(MapViewMouseButtonEventArgs e) 22 | { 23 | 24 | return QueuedTask.Run(() => 25 | { 26 | IReadOnlyList layerList = MapView.Active.Map.FindLayers(Pro.settings.ParcelLayer, true); 27 | if(layerList.Count == 0) 28 | { 29 | MessageBox.Show(string.Format("There must be a layer named '{0}' in order to open ExternalViewer. This can be configured in the Options", Pro.settings.ParcelLayer)); 30 | return; 31 | } 32 | 33 | FeatureLayer parcel = (FeatureLayer)layerList[0]; 34 | 35 | SpatialQueryFilter filter = new SpatialQueryFilter 36 | { 37 | FilterGeometry = MapView.Active.ClientToMap(e.ClientPoint), 38 | SpatialRelationship = SpatialRelationship.Intersects 39 | }; 40 | 41 | RowCursor parcelCursor = parcel.Search(filter); 42 | if (parcelCursor.MoveNext()) 43 | { 44 | Row feature = parcelCursor.Current; 45 | string parcelid = Convert.ToString(feature[Pro.settings.ParcelIDField]); 46 | if(parcelid != null) 47 | { 48 | // open a web browser 49 | string url = string.Format(Pro.settings.ParcelURL, parcelid); 50 | Process.Start(url); 51 | } else 52 | { 53 | MessageBox.Show("That parcel is missing a parcel id, or you have misconfigured the parcelid field in the settings."); 54 | } 55 | } 56 | }); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ProAddins/ExternalViewerSettingsView.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ProAddins/ExternalViewerSettingsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProAddins 4 | { 5 | /// 6 | /// Interaction logic for ExternalViewerSettingsView.xaml 7 | /// 8 | public partial class ExternalViewerSettingsView : UserControl 9 | { 10 | public ExternalViewerSettingsView() 11 | { 12 | InitializeComponent(); 13 | } 14 | 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ProAddins/ExternalViewerSettingsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ArcGIS.Desktop.Framework.Contracts; 3 | 4 | namespace ProAddins 5 | { 6 | internal class ExternalViewerSettingsViewModel : Page 7 | { 8 | #region Private Properties 9 | 10 | private string _originalParcelURL; 11 | private string _parcelURL; 12 | private string _originalParcelLayer; 13 | private string _parcelLayer; 14 | private string _parcelIDField; 15 | private string _originalParcelIDField; 16 | private bool _originalViewerEnabled; 17 | private bool _viewerEnabled; 18 | 19 | 20 | #endregion Private Properties 21 | 22 | #region Accessors 23 | public string ParcelURL 24 | { 25 | get { return _parcelURL; } 26 | set 27 | { 28 | if (SetProperty(ref _parcelURL, value, () => ParcelURL)) 29 | base.IsModified = true; 30 | } 31 | } 32 | 33 | public string ParcelLayer 34 | { 35 | get { return _parcelLayer; } 36 | set 37 | { 38 | if (SetProperty(ref _parcelLayer, value, () => ParcelLayer)) 39 | base.IsModified = true; 40 | } 41 | } 42 | 43 | public string ParcelIDField 44 | { 45 | get { return _parcelIDField; } 46 | set 47 | { 48 | if (SetProperty(ref _parcelIDField, value, () => ParcelIDField)) 49 | base.IsModified = true; 50 | } 51 | } 52 | 53 | public bool ViewerEnabled 54 | { 55 | get { return _viewerEnabled; } 56 | set 57 | { 58 | if (SetProperty(ref _viewerEnabled, value, () => ViewerEnabled)) 59 | base.IsModified = true; 60 | } 61 | } 62 | 63 | private bool IsDirty() 64 | { 65 | if (_originalParcelURL != ParcelURL) 66 | { 67 | return true; 68 | } 69 | 70 | if(_originalParcelLayer != ParcelLayer) 71 | { 72 | return true; 73 | } 74 | 75 | if(_originalParcelIDField != ParcelIDField) 76 | { 77 | return true; 78 | } 79 | 80 | if (_originalViewerEnabled != ViewerEnabled) 81 | { 82 | return true; 83 | } 84 | 85 | return false; 86 | } 87 | 88 | #endregion Accessors 89 | 90 | 91 | #region Page Overrides 92 | /// 93 | /// Invoked when the OK or apply button on the property sheet has been clicked. 94 | /// 95 | /// A task that represents the work queued to execute in the ThreadPool. 96 | /// This function is only called if the page has set its IsModified flag to true. 97 | protected override Task CommitAsync() 98 | { 99 | if (IsDirty()) 100 | { 101 | // save new settings 102 | 103 | Pro.settings.ParcelURL = ParcelURL; 104 | Pro.settings.ParcelLayer = ParcelLayer; 105 | Pro.settings.ParcelIDField = ParcelIDField; 106 | Pro.settings.ViewerEnabled = ViewerEnabled; 107 | 108 | Pro.settings.Save(); 109 | } 110 | 111 | return Task.FromResult(0); 112 | } 113 | 114 | /// 115 | /// Called when the page loads because to has become visible. 116 | /// 117 | /// A task that represents the work queued to execute in the ThreadPool. 118 | protected override Task InitializeAsync() 119 | { 120 | 121 | // assign values binding to controls 122 | _parcelURL = Pro.settings.ParcelURL; 123 | _parcelLayer = Pro.settings.ParcelLayer; 124 | _parcelIDField = Pro.settings.ParcelIDField; 125 | _viewerEnabled = Pro.settings.ViewerEnabled; 126 | 127 | // keep track of original values 128 | _originalParcelURL = ParcelURL; 129 | _originalParcelLayer = ParcelLayer; 130 | _originalParcelIDField = ParcelIDField; 131 | _originalViewerEnabled = ViewerEnabled; 132 | 133 | return Task.FromResult(0); 134 | } 135 | 136 | /// 137 | /// Called when the page is destroyed. 138 | /// 139 | protected override void Uninitialize() 140 | { 141 | } 142 | 143 | #endregion 144 | 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /ProAddins/Images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/Images/Thumbs.db -------------------------------------------------------------------------------- /ProAddins/Images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/Images/home.png -------------------------------------------------------------------------------- /ProAddins/Images/streetview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/Images/streetview.png -------------------------------------------------------------------------------- /ProAddins/Images/streetview16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/ProAddins/Images/streetview16.png -------------------------------------------------------------------------------- /ProAddins/Migration-2025-01-31_11-36-32.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |

Migration Status Report

6 |

Migrate project: C:\Repos\ArcGIS\ProAddins\arcgis-pro-addins\ProAddins\ProAddins.csproj

7 |

ProAddins.csproj

8 | 9 | 10 | 11 | 12 |

Note: project might contain NuGets in packages.config, please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6.

13 |

Note: please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6.

14 | 15 | -------------------------------------------------------------------------------- /ProAddins/Migration-2025-01-31_11-36-32.txt: -------------------------------------------------------------------------------- 1 | Migration Status Report 2 | Migrate project: C:\Repos\ArcGIS\ProAddins\arcgis-pro-addins\ProAddins\ProAddins.csproj 3 | ProAddins.csproj 4 | project folder: 5 | C:\Repos\ArcGIS\ProAddins\arcgis-pro-addins\ProAddins\ 6 | C:\Repos\ArcGIS\ProAddins\arcgis-pro-addins\ProAddins\ 7 | language: CS 8 | project type: AddIn 9 | project has WPF: PresentationFramework 10 | Note: project might contain NuGets in packages.config, please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6. 11 | Note: please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6. 12 | -------------------------------------------------------------------------------- /ProAddins/OpenStreetviewTool.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using System.Diagnostics; 3 | using ArcGIS.Desktop.Mapping; 4 | using ArcGIS.Desktop.Framework.Threading.Tasks; 5 | using ArcGIS.Core.Geometry; 6 | using System.Globalization; 7 | 8 | namespace ProAddins 9 | { 10 | internal class OpenStreetviewTool : MapTool 11 | { 12 | protected override void OnToolMouseDown(MapViewMouseButtonEventArgs e) 13 | { 14 | if (e.ChangedButton == System.Windows.Input.MouseButton.Left) 15 | e.Handled = true; //Handle the event args to get the call to the corresponding async method 16 | } 17 | 18 | protected override Task HandleMouseDownAsync(MapViewMouseButtonEventArgs e) 19 | { 20 | return QueuedTask.Run(() => 21 | { 22 | // Convert the clicked point in client coordinates to the corresponding map coordinates. 23 | MapPoint mapPoint = MapView.Active.ClientToMap(e.ClientPoint); 24 | 25 | // convert to lon/lat 26 | MapPoint coords = (MapPoint)GeometryEngine.Instance.Project(mapPoint, SpatialReferences.WGS84); 27 | 28 | // open a web browser 29 | CultureInfo culture = new CultureInfo("en-US"); 30 | string url = string.Format("https://www.google.com/maps/@?api=1&map_action=pano&viewpoint={0}%2C{1}", coords.Y.ToString(culture), coords.X.ToString(culture)); 31 | //string url = string.Format("http://maps.google.com/?cbll={0},{1}&cbp=12,90,0,0,5&layer=c", coords.Y.ToString(culture), coords.X.ToString(culture)); 32 | Process process = Process.Start(new ProcessStartInfo 33 | { 34 | FileName = url, 35 | UseShellExecute = true 36 | }); 37 | }); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ProAddins/Pro.cs: -------------------------------------------------------------------------------- 1 | using ArcGIS.Desktop.Framework; 2 | using ArcGIS.Desktop.Framework.Contracts; 3 | using ArcGIS.Desktop.Core; 4 | using ArcGIS.Desktop.Core.Events; 5 | using ArcGIS.Desktop.Framework.Dialogs; 6 | using System.Windows; 7 | 8 | namespace ProAddins 9 | { 10 | internal class Pro : Module 11 | { 12 | private static Pro _this = null; 13 | private static Settings _settings = Settings.Default; 14 | 15 | /// 16 | /// Retrieve the singleton instance to this module here 17 | /// 18 | public static Pro Current 19 | { 20 | get 21 | { 22 | return _this ?? (_this = (Pro)FrameworkApplication.FindModule("ProAddins_Module")); 23 | } 24 | } 25 | 26 | public static Settings settings 27 | { 28 | get { return _settings; } 29 | } 30 | 31 | 32 | 33 | #region Overrides 34 | /// 35 | /// Called by Framework when ArcGIS Pro is closing 36 | /// 37 | /// False to prevent Pro from closing, otherwise True 38 | protected override bool CanUnload() 39 | { 40 | //TODO - add your business logic 41 | //return false to ~cancel~ Application close 42 | return true; 43 | } 44 | 45 | protected override bool Initialize() //Called when the Module is initialized. 46 | { 47 | ProjectOpenedEvent.Subscribe(OnProjectOpened); //subscribe to Project opened event 48 | return base.Initialize(); 49 | } 50 | 51 | private void OnProjectOpened(ProjectEventArgs obj) //Project Opened event handler 52 | { 53 | if (Pro.settings.ViewerEnabled) 54 | { 55 | FrameworkApplication.State.Activate("viewer_state"); 56 | } else 57 | { 58 | FrameworkApplication.State.Deactivate("viewer_state"); 59 | } 60 | } 61 | 62 | protected override void Uninitialize() //unsubscribe to the project opened event 63 | { 64 | ProjectOpenedEvent.Unsubscribe(OnProjectOpened); //unsubscribe 65 | return; 66 | } 67 | 68 | 69 | #endregion Overrides 70 | 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /ProAddins/ProAddins.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0-windows10.0.17763.0 5 | win-x64 6 | false 7 | true 8 | false 9 | CA1416 10 | true 11 | 12 | 13 | 14 | C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll 15 | False 16 | False 17 | 18 | 19 | C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll 20 | False 21 | False 22 | 23 | 24 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll 25 | False 26 | False 27 | 28 | 29 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll 30 | False 31 | False 32 | 33 | 34 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll 35 | False 36 | False 37 | 38 | 39 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll 40 | False 41 | False 42 | 43 | 44 | C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll 45 | False 46 | False 47 | 48 | 49 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll 50 | False 51 | False 52 | 53 | 54 | C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll 55 | False 56 | False 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | SettingsSingleFileGenerator 80 | Settings.Designer.cs 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | True 89 | True 90 | Settings.settings 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /ProAddins/ProAddins.csproj.bak: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {7E497630-98EC-4355-A32B-4CEDC42F008D} 9 | Library 10 | Properties 11 | ProAddins 12 | ProAddins 13 | v4.8 14 | 512 15 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 16 | 17 | 18 | 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | Program 27 | C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe 28 | AnyCPU 29 | 30 | 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | Program 38 | C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe 39 | AnyCPU 40 | 41 | 42 | 43 | ..\packages\Octokit.0.29.0\lib\net45\Octokit.dll 44 | 45 | 46 | ..\packages\ProEvergreen.1.1.0\lib\net461\ProEvergreen.exe 47 | 48 | 49 | ..\packages\Semver.2.0.4\lib\net452\Semver.dll 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll 65 | False 66 | 67 | 68 | C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll 69 | False 70 | 71 | 72 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll 73 | False 74 | 75 | 76 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll 77 | False 78 | 79 | 80 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll 81 | False 82 | 83 | 84 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll 85 | False 86 | 87 | 88 | C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll 89 | False 90 | 91 | 92 | C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll 93 | False 94 | 95 | 96 | C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll 97 | False 98 | 99 | 100 | 101 | 102 | Designer 103 | 104 | 105 | 106 | 107 | ExternalViewerSettingsView.xaml 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | True 118 | True 119 | Settings.settings 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | Designer 137 | MSBuild:Compile 138 | 139 | 140 | 141 | 142 | 143 | 144 | SettingsSingleFileGenerator 145 | Settings.Designer.cs 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 161 | 162 | BuildDefault 163 | 164 | 165 | BuildDefault 166 | 167 | 168 | 169 | 170 | 171 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /ProAddins/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ProAddins")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("ProAddins")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7e497630-98ec-4355-a32b-4cedc42f008d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /ProAddins/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ProAddins": { 4 | "commandName": "Executable", 5 | "executablePath": "C:\\Program Files\\ArcGIS\\Pro\\bin\\ArcGISPro.exe", 6 | "commandLineArgs": "" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /ProAddins/SetDefExprButton.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | using ArcGIS.Desktop.Framework.Contracts; 4 | using ArcGIS.Desktop.Mapping; 5 | using ArcGIS.Desktop.Framework.Threading.Tasks; 6 | using System.Windows; 7 | 8 | namespace ProAddins 9 | { 10 | // a button to set definition expressions on a layer to the selected feature ids 11 | // usage: 12 | // 1. select features 13 | // 2. select layer in the table of contents 14 | // 3. click button 15 | internal class SetDefExprButton : Button 16 | { 17 | protected override void OnClick() 18 | { 19 | FeatureLayer layer = MapView.Active.GetSelectedLayers().OfType().FirstOrDefault(); 20 | this.SetDefinitionQueryAsync(layer); 21 | 22 | } 23 | 24 | protected Task SetDefinitionQueryAsync(FeatureLayer layer) 25 | { 26 | return QueuedTask.Run(() => 27 | { 28 | var selected = layer.GetSelection().GetObjectIDs(); 29 | string expr = string.Join(",", selected); 30 | var idField = layer.GetTable().GetDefinition().GetObjectIDField(); 31 | layer.SetDefinitionQuery($"{idField} in ({expr})"); 32 | }); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ProAddins/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ProAddins { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.12.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("https://beacon.schneidercorp.com/Application.aspx?AppID=74&LayerID=590&PageTypeID" + 29 | "=4&PageID=504&KeyValue={0}")] 30 | public string ParcelURL { 31 | get { 32 | return ((string)(this["ParcelURL"])); 33 | } 34 | set { 35 | this["ParcelURL"] = value; 36 | } 37 | } 38 | 39 | [global::System.Configuration.UserScopedSettingAttribute()] 40 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 41 | [global::System.Configuration.DefaultSettingValueAttribute("Parcel Boundaries")] 42 | public string ParcelLayer { 43 | get { 44 | return ((string)(this["ParcelLayer"])); 45 | } 46 | set { 47 | this["ParcelLayer"] = value; 48 | } 49 | } 50 | 51 | [global::System.Configuration.UserScopedSettingAttribute()] 52 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 53 | [global::System.Configuration.DefaultSettingValueAttribute("PARCELID")] 54 | public string ParcelIDField { 55 | get { 56 | return ((string)(this["ParcelIDField"])); 57 | } 58 | set { 59 | this["ParcelIDField"] = value; 60 | } 61 | } 62 | 63 | [global::System.Configuration.UserScopedSettingAttribute()] 64 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 65 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 66 | public bool ViewerEnabled 67 | { 68 | get 69 | { 70 | return ((bool)(this["ViewerEnabled"])); 71 | } 72 | set 73 | { 74 | this["ViewerEnabled"] = value; 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /ProAddins/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | https://beacon.schneidercorp.com/Application.aspx?AppID=74&LayerID=590&PageTypeID=4&PageID=504&KeyValue={0} 7 | 8 | 9 | Parcel Boundaries 10 | 11 | 12 | PARCELID 13 | 14 | 15 | False 16 | 17 | 18 | -------------------------------------------------------------------------------- /ProAddins/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | https://beacon.schneidercorp.com/Application.aspx?AppID=74&LayerID=590&PageTypeID=4&PageID=504&KeyValue={0} 12 | 13 | 14 | Parcel Boundaries 15 | 16 | 17 | PARCELID 18 | 19 | 20 | False 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ProAddins/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Pro Addins 2 | ========== 3 | 4 | A collection of ArcGIS Pro buttons bundled into an addin. 5 | 6 | ## Streetview 7 | 8 | Open Google streetview on a map click point 9 | 10 | ![Google Streetview](./images/streetview.gif) 11 | 12 | ## Definition Query Buttons 13 | 14 | Buttons to set a definition expression on a layer to the selected features. Similar to Create layer from selection. The only difference is the definition query is placed on the selected layer, not on a newly created layer. 15 | 16 | ![Definition Expression Button](./images/select.gif) 17 | 18 | ## External Viewer Button 19 | 20 | A configureable button that allows a user to open an external application using an ID property and a url. 21 | 22 | This button must be enabled first using the Pro Options dialog and has the following configurable settings: 23 | 24 | - Application URL: The url to the application. Be sure to include the text {0} which will be replaced with the ID property of the selected feature 25 | - Layer ID Field: The field name to query in the selected feature 26 | - Layer Name: The name of the layer to query in the map 27 | -------------------------------------------------------------------------------- /images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/images/Thumbs.db -------------------------------------------------------------------------------- /images/select.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/images/select.gif -------------------------------------------------------------------------------- /images/streetview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/green3g/arcgis-pro-addins/a33d2860a94ab395e41b057ccb4f642015bebd9f/images/streetview.gif --------------------------------------------------------------------------------