Timemap.js v.1.6

Class TimeMapItem

Defined in:
timemap.js

The TimeMapItem object holds references to one or more map placemarks and an associated timeline event.

Constructor

TimeMapItem(placemark, event, dataset, options)

Static Methods

Method
TimeMapItem.closeInfoWindowBasic()
Standard close window function, using the map window
TimeMapItem.openInfoWindowAjax()
Open info window function using ajax-loaded text in map window
TimeMapItem.openInfoWindowBasic()
Standard open info window function, using static text in map window

Fields

Field
This item's parent dataset
event :{Timeline.Event}
This item's timeline event
eventVisible :{Boolean}
Whether the item's event is visible
map :{GMap2}
The timemap's map object
opts :{Object}
Container for optional settings passed in through the "options" parameter
placemark :{GMarker|GPolyline|GPolygon|GOverlay|Array}
This item's placemark(s)
placemarkVisible :{Boolean}
Whether the item's placemark is visible
selected :{Boolean}
Whether the item is currently selected
timeline :{Timeline}
The timemap's timeline object
visible :{Boolean}
Whether the item is visible

Methods

Method
Specify additional data for export.
changeTheme(theme)
Change the theme for an item
clear()
Delete placemark from map and event from timeline
Close the info window for this item.
createEvent(s, e)
Create a new event for the item.
getEnd()
Return the end date of the item's event, if any
Return the timestamp of the end date of the item's event, if any
Return the item's "info point" (the anchor for the map info window)
getNext(inDataset)
Find the next item chronologically
getNextPrev(backwards, inDataset)
Find the next or previous item chronologically
getPrev(inDataset)
Find the previous item chronologically
Return the start date of the item's event, if any
Return the timestamp of the start date of the item's event, if any
Return the title for this item
Return the placemark type for this item
hide()
Hide event and placemark
Hide the timeline event.
Hide the map placemark(s)
Open the info window for this item.
show()
Show event and placemark
Show the timeline event.
Show the map placemark(s)
toJSON()
Clean up item into a nice object for serialization.
Class Detail
TimeMapItem(placemark, event, dataset, options)
Parameters (optional)
placemark {placemark} Placemark or array of placemarks (GMarker, GPolyline, etc)
event {Event} The timeline event
dataset {TimeMapDataset} Reference to the parent dataset object
options {Object} A container for optional arguments
options.title {String} Title of the item
Default: Untitled
options.description {String} Plain-text description of the item
options.type {String} Type of map placemark used (marker. polyline, polygon)
Default: none
options.infoPoint {GLatLng} Point indicating the center of this item
options.infoHtml {String} Full HTML for the info window
options.infoUrl {String} URL from which to retrieve full HTML for the info window
options.infoTemplate {String} HTML for the info window content, with variable expressions (as "{{varname}}" by default) to be replaced by option data
options.templatePattern {String} Regex pattern defining variable syntax in the infoTemplate
Default: /{{([^}]+)}}/g
options.openInfoWindow {Function} Function redefining how info window opens
options.closeInfoWindow {Function} Function redefining how info window closes
options.theme {String|TimeMapTheme} Theme applying to this item, overriding dataset theme
options[...] {mixed} Any of the options for TimeMapTheme may be set here
Static Method Details
TimeMapItem.closeInfoWindowBasic()
Standard close window function, using the map window
TimeMapItem.openInfoWindowAjax()
Open info window function using ajax-loaded text in map window
TimeMapItem.openInfoWindowBasic()
Standard open info window function, using static text in map window
Field Details
dataset :{TimeMapDataset}
This item's parent dataset
event :{Timeline.Event}
This item's timeline event
eventVisible :{Boolean}
Whether the item's event is visible
map :{GMap2}
The timemap's map object
opts :{Object}
Container for optional settings passed in through the "options" parameter
placemark :{GMarker|GPolyline|GPolygon|GOverlay|Array}
This item's placemark(s)
placemarkVisible :{Boolean}
Whether the item's placemark is visible
selected :{Boolean}
Whether the item is currently selected
timeline :{Timeline}
The timemap's timeline object
visible :{Boolean}
Whether the item is visible
Method Details
addExportData(data) :{Object}
Specify additional data for export. Replace this function to change settings.
Parameters (optional)
data {Object} Initial map of export data
Returns:
{Object} Expanded map of export data
Defined in:
export.js
changeTheme(theme)
Change the theme for an item
Parameters (optional)
theme {TimeMapTheme} New theme settings
Defined in:
manipulation.js
clear()
Delete placemark from map and event from timeline
Defined in:
manipulation.js
closeInfoWindow()
Close the info window for this item. By default this is the map infoWindow, but you can set custom functions for whatever behavior you want.
createEvent(s, e)
Create a new event for the item.
Parameters (optional)
s {Date} Start date for the event
e {Date} (Optional) End date for the event
Defined in:
manipulation.js
getEnd() :{Date}
Return the end date of the item's event, if any
Returns:
{Date} Item end dateor undefined
getEndTime() :{Number}
Return the timestamp of the end date of the item's event, if any
Returns:
{Number} Item end date timestamp or undefined
getInfoPoint() :{GLatLng}
Return the item's "info point" (the anchor for the map info window)
Returns:
{GLatLng} Info point
getNext(inDataset) :{TimeMapItem}
Find the next item chronologically
Parameters (optional)
inDataset {Boolean} Whether to only look in this item's dataset
Default: false
Returns:
{TimeMapItem} Next item, if any
Defined in:
manipulation.js
getNextPrev(backwards, inDataset) :{TimeMapItem}
Find the next or previous item chronologically
Parameters (optional)
backwards {Boolean} Whether to look backwards (i.e. find previous)
Default: false
inDataset {Boolean} Whether to only look in this item's dataset
Default: false
Returns:
{TimeMapItem} Next/previous item, if any
Defined in:
manipulation.js
getPrev(inDataset) :{TimeMapItem}
Find the previous item chronologically
Parameters (optional)
inDataset {Boolean} Whether to only look in this item's dataset
Default: false
Requires:
Timeline v.2.2.0 or greater
Returns:
{TimeMapItem} Next item, if any
Defined in:
manipulation.js
getStart() :{Date}
Return the start date of the item's event, if any
Returns:
{Date} Item start date or undefined
getStartTime() :{Number}
Return the timestamp of the start date of the item's event, if any
Returns:
{Number} Item start date timestamp or undefined
getTitle() :{String}
Return the title for this item
Returns:
{String} Item title
getType() :{String}
Return the placemark type for this item
Returns:
{String} Placemark type
hide()
Hide event and placemark
Defined in:
manipulation.js
hideEvent()
Hide the timeline event. NB: Will likely require calling timeline.layout(), AND calling eventSource._events._index() (ugh)
hidePlacemark()
Hide the map placemark(s)
openInfoWindow()
Open the info window for this item. By default this is the map infoWindow, but you can set custom functions for whatever behavior you want when the event or placemark is clicked
show()
Show event and placemark
Defined in:
manipulation.js
showEvent()
Show the timeline event. NB: Will likely require calling timeline.layout()
showPlacemark()
Show the map placemark(s)
toJSON()
Clean up item into a nice object for serialization. This is called automatically by the JSON.stringify() function
Defined in:
export.js
©2010 Nick Rabinowitz
Documentation generated by JsDoc Toolkit 2.3.2 on Thu Jun 24 2010 13:58:04 GMT-0700 (PDT)