GetNextPoint

Home
Support
Documentation
APIs
Test cases
GetNextPoint
Share

GetNextPoint

———————————

This is very similar to GetDirectionPoint API. When you get directions from point A to point B – you are limited to the map’s directions. What if you wanted to define your user’s walk yourself – in other words, you user decides to walk from point A to point B but takes a route of his/her own (pretty much what we all do in real life). This method allows you to simulate just that – and get sequential points on this ‘polyline’ (ah, how we love these geeky words – it really means a random line :-) ).

URL:

https://dev.geoloqal.com/GetNextPoint

Supported Method(s):

GET

Parameters:

api_key: This is the api_key that’s associated with your account. Remember not to share this with anyone.
required
device_type: (e.g. Android/iPhone/Blackberry).
required
step: (e.g. 0,1,2 etc). This is important as you can only provide sequential steps. So, first you call the API with 0 – that starts the trip. The subsequent calls should be incremental – i.e you cannot call the API with step=5 and then call the same API with step=4. This will cause an error. After all the steps are done (in other words, your user has reached his/her destination)
required
output_type: optional (e.g. json or xml)

 

Responses

For missing required fields/inputs:
{"error":"insufficient input"}
For wrong api_key :
{"error":"wrong api key"}
For missing device_type :
{"error":"device type required"}
For invalid device_type:
{"error":"invalid device_type"}
For an invalid testcase:
{"error":"testcase doesn't exist"}
For wrong api_key and testcase_name :
{"error":"invalid request"}
Invalid test case type: — i.e. you probably passed it a test case that uses address as parameters. Success :
{"error":"invalid testcase"}{"latitude":42.671199798584,"longitude":-1.4623099565506} OR 42.671199798584-1.4623099565506

 

Samples

cURL sample:

curl "https://dev.geoloqal.com/GetNextPoint?api_key=InsertYourAPIKeyHere&testcase_name=YOURTESTCASE&device_type=Android&step=0&output_type=json"