×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    how to request places within given radius?

    Hi
    I have my current coordinates and a radius, how to request places within given radius using RESTFul API?
    thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: how to request places within given radius?

    You can specify a search within a given viewport, by adding a an X-Map-Viewport Header.

    Using this header:
    Code:
    X-Map-Viewport   13.39,52.51,13.41,52.54
    And this URL ( note the lack of at parameter)
    Code:
    http://demo.places.nlp.nokia.com/places/v1/discover/explore?tf=plain&pretty=y&size=10&app_id=demo_qCG24t50dHOwrLQ&app_code=NYKC67ShPhQwqaydGIW4yg
    You will get the results within a given box, which is more typical for display on a map.

    If you need to reduce this to a radius, you'll just need to calculate the corners of the box from your centre point and distance. The mathematics can be seen here:

    http://www.johndcook.com/lat_long_details.html

    For a simple calculation, 1 nautical mile = 1/60th degree latitude at the equator = approx. 6000ft = 1.852km = 1.151 miles
    Last edited by jasfox; 2012-04-12 at 09:42. Reason: minutes, not degrees. The globe is 60 times larger than that.

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

    Re: how to request places within given radius?

    Hi,

    the viewport header is a good way to go.

    However, please be aware, that we take this as an indicator of what part of the map the user of your application is looking at. We might serve places that are outside this region in the case that there are some good results just outside of it.

    Thus, exact region search is not fully supported yet. Since the API is in development and we will add more features to it, could you tell us more about your use case?

    Some more details on the current behaviour:

    When trying to serve the best set of places we process several location contexts that you could provide to us.

    * We currently support one explicit location context (i.e., the user tapped on the map to explicitly search here) which can be set using the "at" query parameter.
    * We currently support two implicit location contexts:
    | * The X-Map-Viewport header to indicate which part of the map the user is looking at
    | * The Geolocation header to indicate the physical position user as derived from GPS or WiFi sensors

    Position values support uncertainty values and an indicator from which sensor the data is coming from.

    Additionally you can provide us the X-Mobility-Mode header to indicate if the user is driving, walking or not moving at all.

    Documentation on these parameters can be found here:
    http://api.maps.nokia.com/en/restpla....html#location

    and here:
    http://api.maps.nokia.com/en/restpla...pi_ref_headers

    Best,
    daniel.
    Last edited by danielmoor; 2012-04-12 at 10:25.
    Daniel Moor
    Nokia Places API

  4. #4
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: how to request places within given radius?

    Hi

    thanks for yer answers
    Daniel, are you planning to support radius search as it google does for example?
    the use case is AR application, btw

    thanks,
    Vlad

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

    Re: how to request places within given radius?

    Hi Vlad,

    We are evaluating it.

    Do you need to search for a given term or do you want to explore places?

    daniel.
    Daniel Moor
    Nokia Places API

Similar Threads

  1. Background color and border-radius
    By Rondo23 in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-11-28, 10:31
  2. Replies: 2
    Last Post: 2010-05-19, 09:20
  3. How to get GPS coordinates within a radius?
    By kbelcon in forum Geolocation and Navigation
    Replies: 1
    Last Post: 2010-03-17, 14:08
  4. Login script for RADIUS
    By torui in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2002-08-21, 23:44

Posting Permissions

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