Search code examples
flutterhere-api

HERE Search parameter 'r' not functioning


I am calling the public transit v8 like this

    https://transit.hereapi.com/v8/stations?in=51.492597,-0.156927;r=1000&return=transport&apiKey=my_key

However, no matter what i change the r value to it continues search the default distance, whether i put it higher or lower than 500, it returns the same.

Documentation states - {lat},{lng}[;r={radius}] and all example show lat,long;r=x

I am sure I am using the correct formatting

Does anyone know why this may be?


Solution

  • If you try r=20 and r=50 you'll see a different number of stations returned.

    There is an optional parameter maxPlaces that has some default value. If you change this it should return more stations for when r is set to larger numbers. For example:

    https://transit.hereapi.com/v8/stations?in=51.492597,-0.156927;r=500&return=transport&maxPlaces=50&apiKey=my_key