VizMap javaScript

VizMap: the generated javaScript  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.

Generating javaScript from Excel

The main theme of this site is Excel and how to free it from your desktop to leverage the many useful web services out there. You have to use javaScript to be able to do that. Having said that, every downloadable example on this site can work without you having to write a line of javaScript. This is because the VBA code generates the required javaScript. 

For these VizMap applications, the skeleton code is actually held in a parameter sheet. This means that you can customize it if you need to, or indeed if do not even use Excel, you can use the example downloadable web pages as a base for something other use.  This section will walk through some of the techniques used in the completed javaScript applications. 

The javaScript Parameter Block

All the code is stored in this parameter Block in the geoCodingParameter worksheet. 


The code blocks very roughly correspond to some of  the object structures used in the application
Here is how these structures are used
  • a VizMap is a container object for all that follows.
  • a Spot holds a single Google Map marker. There will be one of these for each unique SpotID in your input data.
  • an Item is a single row of data. There will be on of these for each row in your input data. There can be multiple Items with the same SpotID.
  • a map is a Google Map Object, this can also be a Google Earth Object depending on the provider.
  • InfoTabs are a collection of tabs associated with each item. Each Item has a single collection.
  • Tabs are the individual tab views for each infoTab. There will be as many of these for each item as you sepcified in VizMap Tabs
  • Info elements are a collection of document elements as referenced in the VizMap Element positioning 
  • Selections are the currently selected tab in any info window
  • Tables and charts are the content associated with the current selection. They consist of Google Visualization Tables, TableViews and charts as well as some other content. They are displayed according to how you have setup VizMap Element positioning