If you watched the Plenary session at the 2008 ESRI User Conference, one of the tasks demonstrated during the ArcGIS Explorer presentation was called StreetViewer. StreetViewer is a “smashup” of ArcGIS Explorer and a Google Street View service that Explorer development team members Rob Dunfey and Michael Waltuch collaborated on. We blogged about the presentation earlier, and here’s an example showing the StreetView near the ESRI Campus.
The Official Google Maps API Blog describes Street View as a service that “allows users to view 3D panoramas of various locations around the world and to navigate around neighborhoods as if they were (almost) really there.”
The Explorer task lets you grab a coordinate from the map and if a Street View image is available for the location, the task creates a result at the location and its associated popup window displays the Street View image at the coordinate. You can interact with the image inside the popup window, looking around the panorama and follow the path of the nearby streets. It’s a really cool service.
Since the conference we’ve had a bunch of requests to make the source code for this task available, and have recently posted a project at ArcScripts that has everything you need except for a couple of things. We’ll describe them here, and how to get everything set up and working.
First, you’ll need to make changes to a copy of the file named panoAvailable.html that’s part of the project. After making changes to the file, you’ll need to move it to a publicly accessible URL from where it will display the Street View image. So, in panoAvailable.html you’ll see there’s a place for you to specify a Google Maps API Key that corresponds to the URL:
If you don’t have a key you can get one at http://code.google.com/apis/maps/signup.html.
Next, in the LoadStreetViewQuery’s try block in the project’s CustomTaskControl.cs class, you’ll need to specify the location of panoAvailable.html:
Move a copy of the file to the URL location you specified in LoadStreetViewQuery. Finally, compile the task. You’re ready to deploy it to your users.