×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    1

    Get Address details for each location without following link?

    Hello,

    Is it possible to get the address details of a location without having to follow the link from the href parameter for each location?
    Is there a parameter to retrieve the address fields right away with the first hit to nokia API?

    Here is a sample result

    {
    "position": [
    45.50277,
    -73.57024
    ],
    "distance": 755,
    "title": "Starbucks",
    "averageRating": 0,
    .........
    "href": "http://demo.places.nlp.nokia.com/places/v1/places/124f25dv-6646b31497754590acdcdcb7391015f6;context=Zmxvdy1pZD0zNDY1NGJhNy03ODRkLTU1NDktODM2Mi05NjUyOWI2ODhiY2JfMTM2ODA0MDk1MjM3NV8wXzk0MTkmcmFuaz0y",
    },

    By following this link we would get another json result with the semantically distinct address fields like state, city, zip code...


    The reason why I am asking this is because it takes a long time to run 10 HTTP requests to get all the address details of 10 different locations, the user experience could be a lot better with more speed.

    Thank you.

  2. #2
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    289

    Re: Get Address details for each location without following link?

    This appears to be a design decision as can be seen from the following quote in the Developer's Guide
    Clients interact with the Places API using hypermedia links in the resources.A hypermedia link is represented as a JSON object which has an href attribute. Other link attributes may be present which give more details about the link
    The usual manner of using Places would be to obtain a general summary of information about the request and then drill down to get more details.
    It should be noted that even on a discover request the formatted address of each place is usually found in the vicinity element of the items
    If you really need city, street etc. There would be nothing stopping you from making an initial search request and then drill down further of course.
    Last edited by jasfox; 2013-05-15 at 11:33.

  3. #3
    Nokia Developer Expert
    Join Date
    Apr 2012
    Location
    Berlin, Germany
    Posts
    42

    Re: Get Address details for each location without following link?

    Hi,

    please do not use vicinity for detailed addresses. The purpose of the vicinity field is to distinguish between different search results with the same name (example: Burger King 6th Avenue vs. Burger King 8th Avenue). Hence, although we currently often return full addresses, this might change to only contain the discriminating part of the address.

    For your original question, unfortunately there is no other solution than to follow all places links. However, you could do so only after the user selected a place and maybe for displaying places in a list, vicinity is enough. But I don’t know enough about your use case. If you really need all the data, you could fire the place details requests in parallel (in which case you still would have 2 rounds of requests, the first discover request and then n details requests) and you definitely should enable compression by setting the Accept-Encoding header.

    Best
    daniel.
    Daniel Moor
    Nokia Places API

Similar Threads

  1. Gettting Location details
    By as.kulkarni67 in forum Mobile Java General
    Replies: 2
    Last Post: 2012-02-13, 12:21
  2. How to fetch location details using GPRS
    By harinrd in forum Mobile Java General
    Replies: 6
    Last Post: 2010-08-09, 10:41
  3. How to get Location Details using GPRS
    By harinrd in forum Symbian
    Replies: 3
    Last Post: 2010-04-28, 03:19
  4. Who knows the Location Listener's lifecycle in details?
    By livelocus in forum Mobile Java General
    Replies: 1
    Last Post: 2009-07-13, 08:24
  5. Extracting details (web address) from sms
    By anpavisi in forum General Messaging
    Replies: 3
    Last Post: 2007-11-09, 06:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×