Timemap.js v.2.0.1

Class TimeMap.loaders.jsonp

Extends:
TimeMap.loaders.remote
Defined in:
json.js

JSONP loader - expects a service that takes a callback function name as the last URL parameter.

The jsonp loader assumes that the JSON can be loaded from a url with a "?" instead of the callback function name, e.g. "http://www.test.com/getsomejson.php?callback=?". See the jQuery.ajax documentation for more details on how to format the url, especially if the parameter is not called "callback". This works for services like Google Spreadsheets, etc., and accepts remote URLs.


TimeMap.init({
    datasets: [
        {
            title: "JSONP Dataset",
            type: "jsonp",
            options: {
                url: "http://www.example.com/getsomejson.php?callback=?"
            }
        }
    ],
    // etc...
});

Constructor

TimeMap.loaders.jsonp(options)

Fields

Field
Inherited from TimeMap.loaders.remote
opts :{String}
Object to hold optional settings.
Inherited from TimeMap.loaders.base
scrollTo :{String|Date}
Date to scroll the timeline to on load

Methods

Method
Inherited from TimeMap.loaders.base
cancel()
Cancel the callback function for this loader.
Inherited from TimeMap.loaders.base
getCallback(dataset, callback)
Get a callback function that can be cancelled.
Inherited from TimeMap.loaders.base
getCallbackName(dataset, callback)
Get the name of a callback function that can be cancelled.
Inherited from TimeMap.loaders.remote
load(dataset, callback)
Load function for remote files.
Inherited from TimeMap.loaders.base
parse()
Parser function to turn a string into a JavaScript array
Inherited from TimeMap.loaders.base
Function to call on data object before loading
Inherited from TimeMap.loaders.base
Function to call on a single item data object before loading
Class Detail
TimeMap.loaders.jsonp(options)
Parameters (optional)
options {Object} All options for the loader:
options.url {String} URL of JSON service to load, callback name replaced with "?"
options[...] {mixed} Other options (see loaders.remote)
©2010 Nick Rabinowitz
Documentation generated by JsDoc Toolkit 2.3.2 on Sat Aug 06 2011 13:40:08 GMT-0700 (PDT)