Is there a streetview add-in for ArcGIS Pro

31526
51
Jump to solution
02-16-2017 10:47 PM
MervynLotter
Occasional Contributor III

Hi there

Is anybody aware of a streetview add-in for ArcGIS Pro? 

Thank you.

51 Replies
Jimmy_Simpson
New Contributor III

Yes, clicking on the street open the street view in your default browser.

Would be curious your code for opening it inside of Pro.

0 Kudos
BrianBulla
Occasional Contributor III

Hi.  It's super easy really.  Just add a dockpane with a WebBrowser control in it.  Then instead of opening a browser just assign the url to the dockpane WebBrowser.  

//Open the dockpane if it isn't already open
                    DockPane pane = FrameworkApplication.DockPaneManager.Find("ArcPro_DSM_Settings_Dockpane");
                    pane.Activate();

                    //Access the web control through the View
                    DockpaneView myView = DockpaneView.MyDockpaneView;
                    myView.currentUri = new Uri(@"https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=" + lat + "," + lng);
                    myView.streetViewControl.Navigate(@"https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=" + lat + "," + lng);

 

SheriNorton
Occasional Contributor II

Newbe to configurations (non-programmer)! Would love to implement the dockpane versus browser view of StreetView, but not sure how this is done? Where would that code block be used?

0 Kudos
BrianBulla
Occasional Contributor III

You just need to add a new ArcGIS Pro Dockpane to your Visual Studio project, add whatever controls you want to it, and then get it to work with the rest of your code.  I would say to find a Dockpane sample in the ArcGIS Pro samples and then just customize to work for your situation.

0 Kudos
BrianBulla
Occasional Contributor III

OK, I'll work on cleaning up the code I created an post a version onto GitHub.  Similar, but using DockPanes.

0 Kudos
Jimmy_Simpson
New Contributor III

@BrianBulla The 3.0 version is still reporting as targeting 2.8 and won't load in my v3.1 - I sent you a direct message when you get the chance with a couple other questions.

0 Kudos
BrianBulla
Occasional Contributor III

OK, so here is my version of a StreetView tool.  This was compiled for Pro 2.9, so it will not work in 3.x.  I only have access to 3.0 and one of the libraries I use is not compatible, so I will have to wait till I have access to 3.1 before I can post an update.

AddIn and code available here:

https://github.com/bbulla24/ArcProStreetviewTool

BrianBulla_0-1679332127893.png

 

Jimmy_Simpson
New Contributor III

Based on @BrianBulla's code, I have re-wrote the original tool to use a dockpane and the built in WebView2 browser with Pro 3.x. This release is only for 3.1 though. I also worked on the "Link to Active Map" and now the map and street view should stay in sync with each other. Also included a direction arrow on the map when you pan around in street view to show what direction you are looking in. Can't promise this is completely stable.

https://github.com/jsimpson746/arcgis-pro-addins/releases

KurtTowler
New Contributor III

This is terrific. Thank you!

0 Kudos
MicheleBrugnolli
New Contributor

HI , add-in don't work on my PC , i think there is a problem with privacy setting of Google, there is another way to open Chrome ? 

For example open app Chrome With URL " \\...\Chrome.exe & url" 

0 Kudos