Hi there
Is anybody aware of a streetview add-in for ArcGIS Pro?
Thank you.
@SharonAnderson2 I see that Beacon button in the screenshot. I believe in the version I had in 2.9 it said something like "Parcel" - don't remember for sure. Can for sure remove when I export.I think I can recompile it, but not sure about reposting it. Anyone know the legality or courtesy of taking someone else's code, recompiling, and reposting on their own Github account? Sounds really fishy to me.
I created a pretty simple tool that does this. It looked something like this:
<SPAN class="keyword token">using</SPAN> System<SPAN class="punctuation token">.</SPAN>Threading<SPAN class="punctuation token">.</SPAN>Tasks<SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">using</SPAN> System<SPAN class="punctuation token">.</SPAN>Diagnostics<SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">using</SPAN> ArcGIS<SPAN class="punctuation token">.</SPAN>Desktop<SPAN class="punctuation token">.</SPAN>Mapping<SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">using</SPAN> ArcGIS<SPAN class="punctuation token">.</SPAN>Desktop<SPAN class="punctuation token">.</SPAN>Framework<SPAN class="punctuation token">.</SPAN>Threading<SPAN class="punctuation token">.</SPAN>Tasks<SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">using</SPAN> ArcGIS<SPAN class="punctuation token">.</SPAN>Core<SPAN class="punctuation token">.</SPAN>Geometry<SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">namespace</SPAN> ProAddins <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">internal</SPAN> <SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">OpenStreetviewTool</SPAN> <SPAN class="punctuation token">:</SPAN> MapTool <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">override</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">OnToolMouseDown</SPAN><SPAN class="punctuation token">(</SPAN>MapViewMouseButtonEventArgs e<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>e<SPAN class="punctuation token">.</SPAN>ChangedButton <SPAN class="operator token">==</SPAN> System<SPAN class="punctuation token">.</SPAN>Windows<SPAN class="punctuation token">.</SPAN>Input<SPAN class="punctuation token">.</SPAN>MouseButton<SPAN class="punctuation token">.</SPAN>Left<SPAN class="punctuation token">)</SPAN> e<SPAN class="punctuation token">.</SPAN>Handled <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//Handle the event args to get the call to the corresponding async method</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">override</SPAN> Task <SPAN class="token function">HandleMouseDownAsync</SPAN><SPAN class="punctuation token">(</SPAN>MapViewMouseButtonEventArgs e<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">return</SPAN> QueuedTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Run</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">// Convert the clicked point in client coordinates to the corresponding map coordinates.</SPAN> MapPoint mapPoint <SPAN class="operator token">=</SPAN> MapView<SPAN class="punctuation token">.</SPAN>Active<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ClientToMap</SPAN><SPAN class="punctuation token">(</SPAN>e<SPAN class="punctuation token">.</SPAN>ClientPoint<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">// convert to lon/lat</SPAN> MapPoint coords <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>MapPoint<SPAN class="punctuation token">)</SPAN>GeometryEngine<SPAN class="punctuation token">.</SPAN>Instance<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Project</SPAN><SPAN class="punctuation token">(</SPAN>mapPoint<SPAN class="punctuation token">,</SPAN> SpatialReferences<SPAN class="punctuation token">.</SPAN>WGS84<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">// open a web browser</SPAN> <SPAN class="keyword token">string</SPAN> url <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">string</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">Format</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fmaps.google.com%2F%3Fcbll%3D" target="_blank">http://maps.google.com/?cbll=</A><SPAN>{0},{1}&cbp=12,90,0,0,5&layer=c"</SPAN></SPAN><SPAN class="punctuation token">,</SPAN> coords<SPAN class="punctuation token">.</SPAN>Y<SPAN class="punctuation token">,</SPAN> coords<SPAN class="punctuation token">.</SPAN>X<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> Process<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Start</SPAN><SPAN class="punctuation token">(</SPAN>url<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
You also need some daml config. I added it to the map navigation toolbar:
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>updateModule</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>esri_mapping<SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>groups</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>updateGroup</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>esri_mapping_navigateGroup<SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>insertTool</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>ProAddins_OpenStreetviewTool<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">size</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>large<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="punctuation token">/></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>updateGroup</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>groups</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>updateModule</SPAN><SPAN class="punctuation token">></SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Also I just published the addins: Release First Public Release of the Addin tool collection · roemhildtg/arcgis-pro-addins · GitHub
The streetview tool is bundled in with some other buttons so you might want to build it yourself with out the beacon tool, for instance.
hi has anyone tried the addin in 3.4? I got an error "application stopped working"
The 3.1 version still works through Pro 3.3.1. Not going to bother updating the addin unless there is a Pro update that breaks it.
is there any adaptable addin or github folder for the latest version? 3.2.1 or 3.3.0?
This is terrific. Thank you!
thank you!!
I tried running the code in VS and it says it wont build. Im new to VS, how do I get it to work? Or will it not work due to google's terms of service?
If anyone finds they can't get the Google Street View URLS to work for them in the above add-ins (in their version of Pro, such as a pre 2.9 version), I wonder if a last-resort option could be:
Create an add-in that copies the lat/long to the clipboard. Then the user would paste the coordinates into the Google Maps search bar. That might still be better than looking up the address, etc. manually in Google Maps/Street View.
Not sure what to tell you here. The code isn't executing chrome, it is made to call a URL to windows which then windows will open in your default browser. Would check your default browser settings in windows and you can also test by just having a website shortcut to something generic. Opening a website shortcut should be the same general action that Pro is trying to trigger, so if the shortcut doesn't work then you have Windows issues.
You can also just use the built in browser/dockpane in the latest release without having to use an external browser.
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"
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
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 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.
OK, I'll work on cleaning up the code I created an post a version onto GitHub. Similar, but using DockPanes.
The previous version of this is already made for 2.x. Not sure why you are trying to recompile.
https://github.com/roemhildtg/arcgis-pro-addins/releases
Hi Jimmy, I tried to implement the add-in through the ProAddins.esriAddinX into an ArcGIS Pro 2.9 version from your GitHub repository and it doesn't work. I'm not a .NET developer, so I cannnot open the file to make the necesasry changes to recompile it. Do you still hold an old version with the .esriAddinX file configured with the 2.9 compatible version to make the install?
Thanks for taking the time to contribute to the community.
-Aleix
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.
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?
@JulioGarrido Thanks I appreciate that. I did spend some time perfecting the icon - I am glad someone noticed!
Jimmy, you, sir, are a ROCKSTAR!!! Thank you so much!! Losing this functionality was one of the reasons why I regretted upgrading to ArcGIS Pro 3.0. Even the icon looks better.
Now if I can only get Pictometry going, life would be good.😁
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);
Yes, clicking on the street open the street view in your default browser.
Would be curious your code for opening it inside of Pro.
Unfortunately I'm still stuck at ArcGIS Pro 2.9 until our IT department pushes out the 3.0 update. What does this StreetView tool do? Years ago I created a custom StreetView tool that we are currently using. Basically you select the tool, click on the map, and then StreetView opens in either a dockpane within ArcGIS Pro, or you can choose to have it open in a separate browser window.
Does this GitHub tool basically do the same thing??
Hi Jimmy,
Thank you! I guess it would have helped if I read the discussion thread first.....
-Brett
@brettrusnock Read my post above
Hello!
This add-in is great, I have used it for a long time. I just recently updated to Arcgis pro 3.0 and it looks like this add-in no longer works. Error message shown below. Is there an easy way to update the source code for 3.0, or is this a more extensive change. Thanks!
Very thank you @Jimmy_Simpson it working.. i happy with it..hehe
You're a star Jimmy! I did get a response from Gregg on LinkedIn. He did say to me that if someone compiled it for use under 3.0 that they would just need to send him a merge request on Github and then anyone that had his previous version installed would be able to auto-update it through Pro.
@SharonAnderson2 @AlanTonkin_FMConway
Link to the tool updated for ArcGIS Pro 3.0. This is only the street view tool, the other button and the filter group have been removed. Very sloppy work but it's functional.
Street View Add In for ArcGIS Pro 3.0 on GitHub
Nevermind, I checked the license on his Github and its free to do with whatever we want. I'll see what I can do and post here if I can get it done.
That would be awesome....I could use this as well. Although I am not sure how to remove the Beacon button?
@AlanTonkin_FMConway Looks like Gregg hasn't signed in for a while. I'll see if I can recompile his github code to .NET 6 and 3.0. I'll let you know.
Thanks for the add-in. I do have a couple of enhancements/issues. I am running in ArcPro 2.0. After installing the addin, you click on one of the ribbon apps and you can't release it back to the original ID/Select settings. Also, you can't remove the addin unless you remove the fil;e placed in the user folder structure. Lastly, StreetView opens in full screen mode which will cover what you are working on. It might be more useful if it is a smaller window that pops on top of the ArcPro window. Other than these issues, I'm glad someone is providing something for Street View for Pro!
Yes, I have developed this add-in but Google Maps APIs Terms of Service doesn't permit (10.4d)
You could use BingStreetside
Here my code (updated version ArcGIS Pro 3.0)
Hi, thanks for the add-in!!!
I tested the Streetview add-in and I think it will be working (it opens web browser on google maps) but in my case, the coordinates given to browser has coma decimals separator. I think its because my Czech (Europe) Windows, am I right? And is it possible to handle it in your add-in?Thank you very much, Petr B.
Perfect, works like a charm and I have tested it on Pro 2.1 Beta.
Thanks so much for sharing.
Hi,
I'm in the process of trying to figure out how to convert our Google Streeview tool from a 10.2 Add-In to an ArcPro Add-In. The code is below for 10.2. If anyone can help me figure out how to convert it, it would be much appreciated.
After adding the tool to ArcMap, you just click on the tool, then click on the map and streetview open in a web browser. Pretty simple.
using System;using System.Collections.Generic;using System.Text;using System.IO;
using ESRI.ArcGIS.Framework;using ESRI.ArcGIS.ArcMapUI;
namespace GoogleStreetView_Add_In{ public class GoogleStreetView : ESRI.ArcGIS.Desktop.AddIns.Tool { private ESRI.ArcGIS.Carto.IActiveView activeView;
public GoogleStreetView() { }
protected override void OnUpdate() { Enabled = ArcMap.Application != null; }
protected override void OnMouseDown(MouseEventArgs arg) { ESRI.ArcGIS.ArcMapUI.IMxDocument mxDoc = (IMxDocument)ArcMap.Document; activeView = (ESRI.ArcGIS.Carto.IActiveView)mxDoc.FocusMap; //Get the screen coordinates of the mouse down event ESRI.ArcGIS.Geometry.IPoint mousePoint = new ESRI.ArcGIS.Geometry.Point(); mousePoint.X = arg.X; mousePoint.Y = arg.Y;
//Get the map coordinate of the event ESRI.ArcGIS.Geometry.IPoint mapPoint = new ESRI.ArcGIS.Geometry.Point(); mapPoint = GetMapCoordinatesFromScreenCoordinates(mousePoint, activeView);
//MessageBox.Show(mapPoint.X.ToString() + " " + mapPoint.Y.ToString());
//Transform the coordinate to a GCS ESRI.ArcGIS.Geometry.IGeometry geometry = mapPoint;
ESRI.ArcGIS.Geometry.ISpatialReferenceFactory3 srf3 = new ESRI.ArcGIS.Geometry.SpatialReferenceEnvironmentClass(); ESRI.ArcGIS.Geometry.GeographicCoordinateSystem gcs = (ESRI.ArcGIS.Geometry.GeographicCoordinateSystem)srf3.CreateGeographicCoordinateSystem((int)ESRI.ArcGIS.Geometry.esriSRGeoCSType.esriSRGeoCS_NAD1983);
ESRI.ArcGIS.Geometry.ISpatialReference3 spatialRef3 = (ESRI.ArcGIS.Geometry.ISpatialReference3)gcs; spatialRef3.SetFalseOriginAndUnits(-180, -90, 1000000);
geometry.Project(spatialRef3);
//Show in web browser string streetViewLink = @"http://maps.google.ca/maps?q=" + mapPoint.Y.ToString() + "," + mapPoint.X.ToString() + "&num1&s11=" + mapPoint.Y.ToString() + "," + mapPoint.X.ToString() + "&sspn=16.71875,56.536561&ie=UTF8&ll=" + mapPoint.Y.ToString() + "," + mapPoint.X.ToString() + "&spn=0.020401,0.028753&z=15&layer=c&cbll=" + mapPoint.Y.ToString() + "," + mapPoint.X.ToString() + "&panoid=&cbp=12,161.92,,0,5"; System.Diagnostics.Process.Start(streetViewLink); }
//Get the Map coordinate using the mouse coordinate public ESRI.ArcGIS.Geometry.IPoint GetMapCoordinatesFromScreenCoordinates(ESRI.ArcGIS.Geometry.IPoint screenPoint, ESRI.ArcGIS.Carto.IActiveView activeView) {
if (screenPoint == null || screenPoint.IsEmpty || activeView == null) { return null; }
ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay; ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation = screenDisplay.DisplayTransformation;
return displayTransformation.ToMapPoint((System.Int32)screenPoint.X, (System.Int32)screenPoint.Y); } }
}
Thanks Dan, I agree. I took a look at this site before writing through
GeoNet but I did not find any similar add-ins or scripts.
The only source I can think of is ArcGIS Code Sharing and the links there with Streeview are limited
Hi Dan
There was a street view add-in for Pro 1.1 that I used for a while, but this add-in is no longer compatible with the newer versions of Pro. For the life of me I cannot recall where I got this add-in from!
If I now try and run the add-in, the resulting error message seems to be written in Italian (based on Google Translate). The add-in was called PAMStreetView and there are no contact details with the associated files.
The ReadMe.txt file contains the following text:
Double click on PAMStreetView.esriAddInX file for install.
Note:Street View requires WGS84 so add-in projects from your coordinate system current of Map to wgs84 (for now only coordinate system based on a datum wgs84)Tested with ArcGIS Pro 1.1.1For a bug of ArcGIS Pro 1.1.1 I use a rest service for projection in wgs84. In arcgis pro 1.2 I will use arcgis pro api
Version 1.0: initial version
So not to worry about this any further.
I am hoping that there may be other Pro users out there that are aware of this add-in, or other similar 3rd party add-ins, that may be of assistance.
for Pro or otherwise the FAQ link seems not
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.