Array with single object returned in getting district by latitude/longitude
Closed this issue · 7 comments
Hi,
When I request geo/district/find
with lat
and long
params, the data
returned is an array with single object. It should be the district itself because there will always be only one result.
Thanks.
@phyominthu yes i agree better to return the object directly. Could you update it @ThetPaing I know this probably will broke SDK but we can deal with it later.
@phyominthu . Yes sometime it may be only one result. but sometime there is one or more data will be return. ( eg. district/find?lon=95.126367502558&lat=18.505117378065
)
@phyominthu Yes,that is a problem . I don't know that latitube and longitube is border line point or not. so i return as array. But if there is any other way to solve, let me know. @tyohan
IMO If you are standing exactly on the border line, it's not wrong to say you're in one of the two townships. So I think it'll be fine to return the first object in array as a single response.
P.S. One does not simply stand and use his phone on an exact border line. 😄
@ThetPaing have we solve this one? What our decision on this? Is it will be in array on single object?
Have already coded in app to accept array. So let it be.