Deprecated
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 to generate vizMap application

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.

Generating the application

Generating the application will take the parameter data to create a jSon framework, and the data in the venuesMapping sheet to create the jSon data, and wrap it all up in the predefined javaScript found in the geoCoding parameter sheet, along with the application specific html in the venuesParameter sheet.

vba walkthrough

The code can be found in the vizExamples module.
    1. Load the parameter sheets, dSetsSetup plus the additional framework parameter blocks needed for this phase, vizdSetsSetup
    2. Check that all fields mentioned anywhere in the framework exist in the data, allFieldsPresent
    3. Create a heirarchical cJobject to hold the framework
    4. Add the dictionary, measures, tabs and elements. This is just a translation from cDataSet cells to cJobject nodes.
    5. Now create the cJobject to hold the data
    6. Use the Dictionary object to find the required data in the venuesMapping dataset and add each object and its value
    7. Create an html file, generateVizHtml, which takes each of the code components from the parameter sheets and combines that with a jSon serialization of both the framework and data cJobjects.
    8. Start up a browser if required and run the generated application  pickABrowser dSets, fName

complete vba for vizExamples module

Questions, feedback and VizMap applications you have generated can be submitted for loading to this site via our forum.  Now let’s look at VizMap javaScript, the generated application.