Foursquare "Invalid geo coordinates" error - foursquare

I'm getting an error Invalid geo coordinates when using the following Foursquare API search URL:
https://api.foursquare.com/v2/venues/search?client_id=REMOVED&client_secret=REMOVED&ll=174.696603,-36.916037&query=sushi&v=20170310&m=foursquare
The coordinates 174.696603,-36.916037 are valid.
What am I doing wrong here?

You probably set the latitude and longitude in reverse. The latitude must be a number between -90 and 90 and the longitude between -180 and 180.
Use the following URL:
https://api.foursquare.com/v2/venues/search?client_id=REMOVED&client_secret=REMOVED&ll=-36.916037,174.696603&query=sushi&v=20170310&m=foursquare

Related

Binance API error on quantity within range

Getting error, on Binance test API. SPOT TRADING
Symbol: BNBUSDT
Quantity: 0.331
Responce:
{"code":-1013,"msg":"Filter failure: LOT_SIZE"}
On testing on
Quantity: 0.33
ORDER IS EXECUTED
On checking the LOT_SIZE
"filterType": "LOT_SIZE",
"minQty": "0.01000000",
"maxQty": "9000.00000000",
"stepSize": "0.01000000"
Can you please tell what error is causing the ERROR -1013, As the value 0.331 is within range?
The value 0.331 is within minQty and maxQty, but it does not respect the stepSize of 0.01000000. In other words you need to round your value to 2 decimal places.

List<List<List<Float>>> Parse though polygon object

I am trying to parse through a Polygon object to get each of the latitude and longitude but having trouble iterating though it. I am developing in Kotlin Android Studio IDE.
[
[
[-119.81009614166666, 39.52721586111111],
[-119.81022475833333, 39.527206336111114],
[-119.81007891388889, 39.52602547777778],
[-119.8099503, 39.526035005555556],
[-119.81009614166666, 39.52721586111111]
]
]
If your coordinates is in the format above, do the following steps:
var firstCoord = coordinates[0][0]
Log.i("firstCoord", firstCoord.toString());
Log statement gives you the first coordinates: [-119.8101, 39.527214]
Not to sure why some of the precision is lost.

OFFSET and LIMIT are not working when placed in CosmosDB binding of Azure functions

I have followed the process mentioned in the post to supply values for OFFSET and LIMIT in my sqlquery. Below is how it looks like
SELECT * FROM c where c.recordType = 'employees' OFFSET udf.convertToNumber('0') LIMIT udf.convertToNumber('200')
But facing this error,
"message\":\"Syntax error, incorrect syntax near 'udf'.\"
Any help, please?
Why you don't apply just the OFFSET 0 LIMIT 200, instead of calling a udf to convert the string 0 to number 0 and string 200 to number 200?

What's the correct syntax for OData v4 duration in URI?

I'm trying to get new products in last day. Having this URI query:
example.com/v4/Products?$select=Id,Name,CreatedOnUtc&$filter=CreatedOnUtc ge (now() sub P1D0H0M0.0S)
But it returns the message:
The query specified in the URI is not valid. Syntax error at position 37 in 'CreatedOnUtc ge (now() sub P1D0H0M0.0S)'.
What am I having wrong here?
Replace the duration with duration'PT1D0H0M0.0S' (of course, you should replace the quote with %27). Note the PT prefix, not just P.
Please note that OData from MS does not support the function now().

MKMetersBetweenMapPoints incorrectly returning distance in meters

running this code:
NSLog(#"%f", MKMetersBetweenMapPoints(MKMapPointMake(33.6523, -118.507), MKMapPointMake(34.516, -117.628)));
returns this:
0.015819
When the expected output should be ~136900. What am I doing wrong?
It looks like you're giving a regular latitude and longitude to MKMapPointMake(). An MKMapPoint contains and x and y value, not latitude and longitude.
Use MKMapPointForCoordinate(myLocation) to convert your locations to map points, then give those to your MKMetersBetweenMapPoints() function.
Or easier still, use -distanceFromLocation: with two CLLocation objects. It gives you back a distance in meters, taking into account the curvature of the earth.

Resources