0

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?

al246
  • 220
  • 6
  • 16

2 Answers2

1

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
realdrive
  • 36
  • 4
0

The delimiter between query params is an ampersand (&) not a semicolon (;).

Maybe change ;r=1000 to &r=1000

Roslan Amir
  • 1,141
  • 8
  • 16
  • The documentation states the how it must be called and it is {lat},{lng}[;r={radius}], with radius as an optional parametre – al246 Feb 13 '22 at 11:51
  • Noted. I don't have any other suggestion except maybe you want to report to the API owner. – Roslan Amir Feb 14 '22 at 15:04