Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Map Locations

The map locations custom function grabs data from a Google spreadsheet (Map Locations) and embeds Google maps within tabbed list on the page. It uses the spreadsheet information to get the associated Google ID, iframe embed code, museum and title.

Cook book

  • Edit the page
  • Click a “+” sign where you want to insert
  • Select “Code”
  • Paste the following code block
  • Adust parameters as needed

Code block for calendar of events

<script>
$( document ).ready(function() { 
  // selector, activeTab, single, collapsable, collapsed, title 
  do_maps('#mapsContainer',2,false, true, false, 'View Map Locations');
});
</script>
<div id="mapsContainer"></div>

Overrides:

You can dynamically override ActiveTab by adding a parameter to the linking url as:

?tab=n  (where n is a number from 0-4, see ActiveTab below)

Usage:

do_maps(Selector, Activetab, Single, Collapsable, Collapsed, Title)

Parameters:

Parameter Description
Selector Required.
jQuery selector identification where the resulting html code will be generated.
ActiveTab Optional.
  • 1=Ann Arbor Hands On
  • 2=Leslie Science
  • 3=Yankee Air Museum
  • 4=Challenger Learning center
Single Optional.
  • True=Show only the active museum tab.
  • False=All museums (Default)
Collapasble Optional.
  • True=Can be collapsed or expanded (Default)
  • False=Not collapsable
Collapsed Optional.
Collapsable must be set to true, otherwise this paramter is ignored.
  • True=Initially collapsed
  • False=Initially expanded (default)
Title Optional.
Title line at top, default is "View Location Maps"

Return Value:

None

Google Spreadsheet:

Detail Description
Owner aahom220@gmail.com
File Name Location Maps
Folder UIL_Web_Site_Docs
Link Location Maps Spreadsheet
ID 1Xrz1gJ0to5c01jiDyMvl38486s_J94lHhERtTHEBw5E
Sheet Name Maps

Spreadsheet Fields

Column Label Description
A Order Order maps should be displayed
B Museum Museum code, aahom, lesli etc
  • aahom=Ann Arbor Hands On
  • leslie=Leslie Science
  • yankee=Yankee Air Museum
  • experience=Experience Center
  • challenger=Challenger Learning center
C Hide Checked or Yes=Hide this map when displaying locations.
D Text before Message to display before map
E iFrame The html iFrame code to display this map.
F Text after Text to display as after the map

Example Screenshot

Alt Map Directions