Nokia Maps API Reference

Contents

Class nokia.places.widgets.Place

Class Summary

This class defines a UI widget that displays data for one place.

Method Summary
displayOnMap (place, [map]) This method displays a place information in an info bubble on the map.
getData (selector, defaultValue) This method retrieves the rendered data object.
hide () This method hides the rendered widget.
setData (data, (optional)) This method associates data with the given widget and renders the data using a template.
setPlace (place) This method sets the placeId or place reference to trigger data retrieval for the place and subsequent rendering of the data on the page.
setTemplate (template, [locale, [onTemplate, reRender]]) This method changes the template for the given widget.
show () This method shows the rendered widget.
Constructor Detail

This class defines a UI widget that displays data for one place.

new nokia.places.widgets.Place(params)
Parameters:
{Object} params An initialization object that can include parameters for nokia.places.widgets.Widget as well as the following optional properties:
  • placeId - the id of a place which should be initially loaded
  • onData - a user-defined function which is called after the data has been successfully loaded
  • onNoData - a user-defined function which is called when data has failed to load, for example, it does not exist for the provided placeId
  • map - an optional reference to a nokia.maps.map.Display object; when specified and the placeId is set/changed (via a call to nokia.places.widgets.Place.setPlace()), the info bubble is displayed on the map at the location corresponding to the placeId or href (for example, you can implement a click event handler on an instance of nokia.places.widgets.ResultList to call nokia.places.widgets.Place.setPlace() with the href of the place on which the Web user has clicked: this causes the info bubble to be displayed on the map, provided that map refers to a nokia.maps.map.Display object)
Method Detail
displayOnMap (place, [map])
This method displays a place information in an info bubble on the map.
Parameters:
{Object} place A placeId as a string or a JSON object representing the place to display on the map
{Object} [map]: A reference to an instance of nokia.maps.map.Display representing the map on which the place is to be displayed; if not specified, the implementation attempts to use the class property map
setPlace (place)
This method sets the placeId or place reference to trigger data retrieval for the place and subsequent rendering of the data on the page.
Parameters:
{Object} place an object identifying the place for which to retrieve data and render them on the page; the object contains either the property placeId or href (with the value from nokia.places.objects.SearchResult)
Documentation generated on Wed Jun 27 2012 16:54:17 GMT+0200 (CEST).