Places API Reference

Contents

UI API

 
nokia

Data API

 
nokia

jsMotif

 
jsMotif

Namespace nokia.places.data.addressFormatter

Namespace Summary

This namespace offers utilities for formating formatting address data. The functions defined here work with the address object structure supported by the Places API.

Method Summary

getLocationAddressLines (placeObject) : Object
This function returns address lines for the place object provided by the caller.
getLocationFormattedAddress (placeObject) : String
This function returns a formatted address structure for a specific Place object supplied by the caller.

Method Detail

getLocationAddressLines (placeObject) : Object
This function returns address lines for the place object provided by the caller.
Examples:
nokia.places.placesManager.getPlaceData({
     placeId: '250u09wh-83d4c5479b7c4db9836602936dbc8cb8',
     onComplete: function (data) {
          var formattedAddress = nokia.places.data.addressFormatter.getLocationAddressLines(data);
     }
});
Parameters:
{Object} placeObject
An object representing the place for which to return address lines (see also nokia.places.objects.Place)
Returns:
{Object}
An address lines object which contains formatted street, locality and country name
getLocationFormattedAddress (placeObject) : String
This function returns a formatted address structure for a specific Place object supplied by the caller.
Examples:
nokia.places.placesManager.getPlaceData({
     placeId: '250u09wh-83d4c5479b7c4db9836602936dbc8cb8',
     onComplete: function (data) {
          var formattedAddress = nokia.places.data.addressFormatter.getLocationFormattedAddress(data);
     }
});
Parameters:
{Object} placeObject
An object representing the place for which to return a formatted address, (see also nokia.places.objects.Place)
Returns:
{String}
A formatted address

Copyright © 2011 Nokia. All rights reserved. Terms and Conditions