Vba Walkthrough - generating a vizMap application

VizMap: the vba for generating javaScript application get it now

For this example we are going to use the Concerts/Venues example. The complete workbook (googlemapping.xlsm) can be downloaded 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 Bing, Yahoo 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