Google has now stopped its Earth API and Maps API is a paid for API nowadays. Some capabilities have also been either removed or changed. Therefore, I had to remove all examples of VizMap applications I had created. I didn’t remove the entire topic as I thought some of the code may still be useful with some modifications. 

VizMap: the vba for generating javaScript application

This relates to Data Driven Mapping applications For this example I had created a  Concerts/Venues example that is now deprecated. The complete workbook (googlemapping.xlsm) can be downloaded (above) and the example Parameter WorkSheet is called VenuesParameters.

VBA walkthrough

If you are a regular visitor to this site, there is probably nothing new here. All the component classes such  as jSonData Manipulation ClassesComplete Excel Address Data with Google Mapping API and Adding markers to Google Maps from Excel have been covered in other projects so this is just a case of stitching these things together

the modules

In the downloadable workbook, googleMapping.xlsm, you will find 3 implemented applications, as well as all the examples referred to in Creating Map Layers from Excel Data including geoCoding and marking with BingYahoo and Ovi.   For the purposes of generating a vizMap application, only some of those modules are involved, as marked below.

However, all of the class modules are needed


There are 3 steps in creating a vizMap application and generating data for it. Depending on the volatility of your data you may choose to do all or some of these. 

  1. GeoCoding – attaching latitude and longtitude data and splitting a given address into its components.
  2. Joining transaction and master data. Most applications involve looking up other worksheets such as a location master and joining them with transactional data for plotting. This joins transactions with the master data you would have geoCoded in step 1
  3.  Creating a VizMap Application. This pulls together the javaScript code, the jSon encoded framework and data.

In the module, vizEndtoEndExamples, you will find some code that does all 3 in one operation.  For the  Concerts/Venues example , this looks like this, where cVizAppVenues is the name of the parameter sheet for this application

Public Sub endToEndVenues()
  endToEnd cVizAppVenues
End Sub
Private Sub endToEnd(paramName As String)
    ' geocode the master
    googleMappingExample paramName
    ' join to transactions
    transactionJoinExample paramName
    ' create tabbed/viz/mapped app
    googleMarkingViz paramName
End Sub

So the vba to create your own application, once you have created the parameter sheet and input data is very simple .. just create your own version of endToEndVenues. 

vba walkthrough

  1. Complete Excel Address Data with Google Mapping API already covers GeoCoding
  2. Setting up VizMap VBA module
  3. Vba to join master and transactional data
  4. Vba to generate VizMap Application

Questions, feedback and VizMap applications you have generated can be submitted for loading to this site via our forum.  Now let’s look at Setting up VizMap VBA module