Start a new topic

Can't save doc with _geoloc array of geo coordinates

When I try to save a document that has an array of _geoloc coordinates, I get an error:

{"error":"ParameterValueOutOfRange","description":"The value specified for one of the request parameters is out of range","debug":"Geolocation points must be in the form [longitude, latitude] with long between -180 and 180, lat between -90 and 90"}



On the server side BL, I can create _geoloc arrays of coordinates.

Hi Daniel, can you post an example of an actual request for creating a geo array that is failing?
Here's a sample record:

doc = {"name":"Ballistic Zinfandel Paso Robles","_geoloc":[["-73.97329596","40.68601536"],["-74.00171668","40.72466642"],["-71.2593689","42.39729691"],["-122.205725","47.6146898"],["-73.97292417","40.76363038"],["-97.6876435","30.5005883"],["-77.11071617","39.02233448"],["-122.23999297","37.82504415"],["-122.33790719","47.61116805"],["-122.122667","37.41085"],["-118.345752","34.091763"],["-97.76287864","30.31866605"],["-118.495269","34.010053"],["-71.059773","42.358431"],["-118.2608458","34.04714339"],["-121.93962755","37.31843846"],["-77.036464","38.907231"],["-87.7184397","42.04409077"],["-118.396542","34.020635"],["-122.197374","37.460364"],["-87.65417689","41.90475774"],["-122.433333","37.766667"],["-122.31210608","37.54631823"]]}



I'm using a REST request using a XMLHttpRequest

myRequest.send(JSON.stringify(doc))

Looks like the problem is on my end, the records were not storing the floats as strings "". once I converted back to floats they went in ok.
Login or Signup to post a comment