Maps API for JavaScript Developer's Guide

H.places.model.ResultSet

Class Summary

ResultSet - wraps the Discover Result Set and adds auxiliary functions. For more information about Discover Result Set visit our Places API documentation

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

fetchNext (onResult, onError)

Function that follow next link. In case of large collections, next link leads to the next page of the collection. Presence of this function depends if the next parameter on resultSet exist.

fetchPrevious (onResult, onError)

Function that follow previous link. In case of large collections, previous link leads to the previous page of the collection. Presence of this function depends if the previous parameter on resultSet exist.

Class Description

ResultSet - wraps the Discover Result Set and adds auxiliary functions. For more information about Discover Result Set visit our Places API documentation

Constructor Details

H.places.model.ResultSet(resultSet, service)

Parameters:
 
resultSet:
{Object}
 
service:
{H.service.PlacesService}
 

Method Details

fetchNext (onResult, onError)

Function that follow next link. In case of large collections, next link leads to the next page of the collection. Presence of this function depends if the next parameter on resultSet exist.

Follow next link is a Ajax GET request.

Parameters:
 
onResult:
{Function}
 
callback that gets triggered with the full response of the next request.
onError:
{Function}
 
callback gets triggered in case of network errors or in case of invalid request

fetchPrevious (onResult, onError)

Function that follow previous link. In case of large collections, previous link leads to the previous page of the collection. Presence of this function depends if the previous parameter on resultSet exist.

Follow previous link is a Ajax GET request.

Parameters:
 
onResult:
{Function}
 
callback that gets triggered with the full response of the next request.
onError:
{Function}
 
callback gets triggered in case of network errors or in case of invalid request