Nokia Maps API Reference

Contents

Namespace nokia.places.manager

Namespace Summary

The namespace nokia.places.manager defines functions that communicate with the Places server to get and post place-related data. The functions require a place id that can be obtained by performing searches via nokia.places.search.manager.

Method Summary
getImages (params) This function retrieves images for place.
getMedia () This function is deprecated and will not be supported soon, please use nokia.places.manager.getImages instead.
getPlaceData (params) This function retrieves place data for a place identified by the caller.
getRating (params) This function retrieves place ratings for the given place id.
getReviews (params) This function retrieves reviews for the given place id.
postRating (params) This function posts rating for a given place.
Method Detail
getImages (params)
This function retrieves images for place.
Parameters:
{Object} params An object containing the following request parameters:
  • placeId {String} - id of a place (from nokia.places.objects.Place), required
  • onComplete {Function} - a function to be called when the request has been completed, required; the function must accept as arguments responseData and status described under Returns below
  • start {Number} - the starting offset for results, optional
  • limit {Number} - maximum number of results to be returned, optional
Returns:
The return value is made available asynchronously as an argument passed to the onComplete handler and it is a list (nokia.places.objects.List) of elements of the type nokia.places.objects.Media.Image; onComplete's second argument is status, a String constant with the value of 'OK' to indicate success or 'ERROR' to indicate request failure or time-out. Directly function also returns a number which is the request ID and can be used to cancel/abort the current request with nokia.places.comm.data.abortRequest
getMedia ()
This function is deprecated and will not be supported soon, please use nokia.places.manager.getImages instead.
getPlaceData (params)
This function retrieves place data for a place identified by the caller.
Parameters:
{Object} params An object containing request parameters:
  • placeId {String} - the id of a place (from nokia.places.objects.Place); note that placeId is optional, but if it is not provided href must be supplied
  • href {String} - the URL of a place or location which may be obtained from the Search Result nokia.places.objects.SearchResult; note that href is optional, but if it is not provided placeId must be supplied
  • onComplete {Function} - a function to be called when the request has been completed, required; the function must accept as arguments responseData, which is a place object nokia.places.objects.Place containing data returned by the Places back-end, and status, which is a String constant with the value of 'OK' to indicate success or 'ERROR' to indicate request failure or time-out
Returns:
The return value is made available asynchronously as an argument passed to the onComplete handler and it is a place object nokia.places.objects.Place; note that onComplete also receives a second argument indicating the status of the request (see also description of onComplete under getPlaceData() Parameters above). Directly function also returns a number which is the request ID and can be used to cancel/abort the current request with nokia.places.comm.data.abortRequest
getRating (params)
This function retrieves place ratings for the given place id.
Parameters:
{Object} params An object containing request parameters:
  • placeId {String} - id of a place (from nokia.places.objects.Place), required
  • onComplete {Function} - a function to be called when the request has been completed, required; the function must accept two arguments responseData and status described under Returns below
Returns:
The return value is made available asynchronously as an argument passed to the onComplete handler and it is a rating object, for example, {value:4,count: 120} (see also nokia.places.objects.Media.Review); onComplete also receives a second argument, status, which is a String constant with the value of 'OK' to indicate success or 'ERROR' to indicate request failure or time-out. Directly function also returns a number which is the request ID and can be used to cancel/abort the current request with nokia.places.comm.data.abortRequest
getReviews (params)
This function retrieves reviews for the given place id.
Parameters:
{Object} params An object containing the following parameters:
  • placeId {String} - id of a place (from nokia.places.objects.Place), required
  • onComplete {Function} - a function to be called when the request has been completed, required; the function must accept as arguments responseData and status described under Returns below
  • start {Number} - optional result start offset
  • limit {Number} - optional limit of returned results
Returns:
The return value is made available asynchronously as an argument passed to the onComplete handler and it is a list (nokia.places.objects.List) of elements of the type nokia.places.objects.Review; onComplete also receives a second argument, status, which is a String constant with the value of 'OK' to indicate success or 'ERROR' to indicate request failure or time-out. Directly function also returns a number which is the request ID and can be used to cancel/abort the current request with nokia.places.comm.data.abortRequest
postRating (params)
This function posts rating for a given place.
Parameters:
{Object} params An object containing the following parameters:
  • placeId {String} - id of a place (from nokia.places.objects.Place), required
  • ratingValue {Number} - a rating value, required
  • onComplete {Function} - a function to be called when the request has been completed, required; the function must accept as arguments responseData and status described under Returns below
Returns:
The return value is made available asynchronously as an argument passed to the onComplete handler and it is a rating object containing the calculated rating for a place, for example, {value:4,count: 120} (see also nokia.places.objects.Review); onComplete also receives a second argument, status, which is a String constant with the value of 'OK' to indicate success or 'ERROR' to indicate request failure or time-out.
Documentation generated on Wed Jun 27 2012 16:54:23 GMT+0200 (CEST).