You are on page 1of 4

Email Address

:
First Name :
Last Name:
SUBSCRIBE TO LIST
Join our email list to
receive free updates
How we respect your Privacy
Framework for dynamic
Excel Data Analytics, Business Intelligence & Tactical Solutions
Home » Articles
Google Static Image Maps & Street View
The demo created by Petros combines 4 static street view images and 2
static (non-interactive) map images (road & satellite) into an Excel
panorama view using Google's static MAP & Street View APIs.
The Google Static Map v2 API service creates a static (non-
interactive) map based on URL parameters sent through a standard HTTP
request and returns the map as an image, which you can be displayed in
Excel.
In the same way, the Google Street View Image API creates a Street View
panorama. The viewport is defined with URL parameters sent and is
returned as a static image in Excel.
The VBA code is simple: oShape.Fill.UserPicture strURL where strURL is
a string with URL parameters, as defined in Google developer's guides. The
image created by the service is loaded in an Excel shape object.
In our demo, the shape outline has been removed (no outline), the shapes
have been 'snapped to shape' and grouped.
A search address can be entered in 3 ways:
In the ribbon, in the address field.
In the userform's text field, above the 'Show Map' button.
Or by selecting and/or editing a POI (point of interest) from the listbox.
The listbox is loaded with POI descriptions from an Excel 2007 Table
(ListObject), which can be edited by the user.
The slider controls the zoom level, when a search is made through the userform. The Ribbon search is
fixed to zoom level 14.
Google is enforcing a quota limit for non-business use customers. Since 4 Street View requests are made
per search in our Excel demo, the limit per 24 hours is up to 250 searches per viewer. The service will stop
working immediately, if the limit is exceeded to prevent abuse.
If you require an Excel map application, please contact us to discuss your requirements
HOME
FREE ADD-INS
RIBBON
ARTICLES
TUTORIALS
ABOUT US
CONTACT US
BLOG
Please click icon to download the Excel workbook
Filename: Google Maps Panorama (free-unlocked).zip
Click here to read a documentation article or watch the video below
The Excel workbook is free/unlocked and runs in Excel 2007 or later
converted by Web2PDFConvert.com
Ribbon User Interface
development from
VBA & .NET
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Sub GoogleStaticStreetView(oShape As Shape, _
strAddress As String, _
nHeading As Long, _
Optional nHeight As Long = 512, _
Optional nWidth As Long = 512)

'https://developers.google.com/maps/documentation/streetview/

Dim strURL As String

If bRunMode Then On Error Resume Next 'Error if quota exceeded

If Len(strAddress) > 0 Then
'URL-Escaped addresses
strAddress = Replace(strAddress, " ", "+")
Else
Exit Sub
End If

strURL = _
"http://maps.googleapis.com/maps/api/streetview?" & _
"&location=" & strAddress & _
"&size=" & nWidth & "x" & nHeight & _
"&heading=" & nHeading & _
"&sensor=false"

oShape.Fill.UserPicture strURL

End Sub


Sub GoogleStaticMap(oShape As Shape, _
strAddress As String, _
Optional strMapType As String = "roadmap", _
Optional nZoom As Long = 12, _
Optional nHeight As Long = 512, _
Optional nWidth As Long = 512)

'https://developers.google.com/maps/documentation/staticmaps/

Dim strURL As String

If bRunMode Then On Error Resume Next 'Error if quota exceeded

If Len(strAddress) > 0 Then
'URL-Escaped addresses
strAddress = Replace(strAddress, " ", "+")
Else
Exit Sub
End If

strURL = _
"http://maps.googleapis.com/maps/api/staticmap?center=" & _
strAddress & "," & _
"&maptype=" & strMapType & _
"&markers=color:green%7Clabel:%7C" & strAddress & _
"&zoom=" & nZoom & _
"&size=" & nWidth & "x" & nHeight & _
"&sensor=false" & _
"&scale=1"

oShape.Fill.UserPicture strURL

End Sub
converted by Web2PDFConvert.com
Google Maps Excel workbook running in Mac Parallels desktop
converted by Web2PDFConvert.com
How to stamp a workbook with a hidden
author property - Excel Data Analytics
1 comment • a year ago
kkalog — just amazing! keep up the good work
guys!
Excel VBA development best practices
2 comments • a year ago
Zyg D — NIce article.There' a small mistake at the
end of 2nd bullet of #4 suggestion:
Application.Calculation = OriCalcMode …
ZuluTrade - Excel Data Analytics
3 comments • a year ago
Petros Chatzipantazis — Benjax / JamesWe plan
to release the data on a weekly basis along with
a free Addin for analysis and …
World cup 2014 free Excel prediction template
- Spreadsheet1 - Excel Data …
19 comments • 3 months ago
Sumit Bansal — Nice..Thanks!!
ALSO ONWWW.SPREADSHEET1.COM
0 Comments www.Spreadsheet1.com Login
Sort by Newest Share
Start the discussion…
Subscribe Add Disqus to your site
Favorite
Home » Articles » Google Static Image Maps & Street View
Microsoft & the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries
Copyright © 2012-2014 Esoteric Consulting Ltd - United Kingdom
Affiliates
Client Area
Contact us
Privacy Policy
Terms & Conditions
Exit
Search our Website using JRank

SEARCH
Follow Share
converted by Web2PDFConvert.com