Nokia Maps API Reference

Contents

Class nokia.places.ui.Template

Class Summary

The class Template extends the jsMotif templating engine with a DOM element attribute module. The attribute can be used in templates to name the Places API components that can, for example, assist in rendering HTML elements and/or define the behavior of the user interface after the elements have been rendered. In addition, APITemplate allows you to specify initialization parameters for each of the Places API UI components referenced by the templates.

Extends jsMotif.
Method Summary
static getModules (name) : object This method searches for the module named by the caller.
static hideSpinner () This method hides the spinner element.
static render (jsonObject, [targetElem]) This method renders an HTML template, using the data and the target element supplied by the caller.
static renderObject (node, jsonObject) This method renders a single node in the template.
static showSpinner () This method shows the spinner element.
Direct Inheritance
Constructor Detail

The class Template extends the jsMotif templating engine with a DOM element attribute module. The attribute can be used in templates to name the Places API components that can, for example, assist in rendering HTML elements and/or define the behavior of the user interface after the elements have been rendered. In addition, APITemplate allows you to specify initialization parameters for each of the Places API UI components referenced by the templates.

new nokia.places.ui.Template(params)
Parameters:
{Object} params An initialization object that can include parameters defined for jsMotif as well as the following optional properties:
  • moduleParams - {Object}, a hash map which specifies the parameters for the modules that render template DOM nodes; for example, this is how you can enable all rating modules specified within the template and set the perPage parameter for every List object used within the template to 5:
             
             moduleParams: {
                 'Rating': {
                     enabled: true
                 },
                 'List': {
                     perPage: 5
                 }
             }
             
             
Method Detail
static getModules (name) : object
This method searches for the module named by the caller.
Parameters:
{String} name The name of the module for which to search
Returns:
{object} An object representing the located module
static hideSpinner ()
This method hides the spinner element.
static render (jsonObject, [targetElem])
This method renders an HTML template, using the data and the target element supplied by the caller.
Parameters:
{Object} jsonObject An object containing data to be rendered
{Object} [targetElem]: A target element in which to render the data
See:
jsMotif.Template#render
static renderObject (node, jsonObject)
This method renders a single node in the template. It also checks if a module is associated with the node and, if so, it invokes that modules' callback.
Parameters:
{Object} node An object containing the template node to render
{Object} jsonObject An object containing data needed to render in the node
static showSpinner ()
This method shows the spinner element. A new spinner element is created when this method is called for the first time.
Documentation generated on Tue May 08 2012 10:23:34 GMT+0200 (CEST).