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.
|
Single | Optional.
|
Collapasble | Optional.
|
Collapsed | Optional. Collapsable must be set to true, otherwise this paramter is ignored.
|
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
|
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