Places+ API doesn't consume latitude/longitude?

8 views
Skip to first unread message

H K

unread,
Oct 10, 2011, 8:44:22 PM10/10/11
to Hyperpublic API Developers
Hi

I am trying to use the Places+ API to search for places. It seems to
me the API didn't consume the latitude and longitude parameters I
passed in

For example, with
https://api.hyperpublic.com/api/v1/places?lat=47.61lon=-122.33limit=20
(client_id and client_secret removed)
what I got are some places in Los Angeles area, while the coordinate
47.6,-122.33 is in Seattle:

[{"locations":[{"name":"5301 Beach Blvd, Buena Park, CA
90621","lon":-117.996940612793,"city":"Buena
Park","country":"US","postal_code":"90621" ...

I found out, however, I can add a "location" parameter to force the
results to be in Seattle:
https://api.hyperpublic.com/api/v1/places?lat=47.61lon=-122.33limit=20&location=seattle
But again results doesn't seem to change if I change the latitude/
longitude.

Interestingly, if I remove all the parameters (except client_id and
client_secrete) and just call
https://api.hyperpublic.com/api/v1/places
What I got are exactly the same as the results from the first query,
which are places in LA.

Are latitude and longitude being used at all, or is there anything
wrong with the way I call the API?

Thanks
HK

Eric Tang

unread,
Oct 10, 2011, 9:25:01 PM10/10/11
to hyperpublic-a...@googlegroups.com
Hi HK,

From the url, I see that you are passing in lat=47.61lon=-122.33.
Lat and Lon are actually 2 separate parameters.  You should be able to solve your problem by adding a "&" in between.


Cheers,
Eric Tang

Doug Petkanics

unread,
Oct 11, 2011, 10:19:30 AM10/11/11
to hyperpublic-a...@googlegroups.com
Hi, we actually just fixed a bug which was affecting lat/lon queries for certain users. Please let us know if you are still experiencing problems, or if you have any other questions.

Also, as a point of clarification, the "location" param overrides the lat/lon params. You can pass an address, or a zip code, or an address fragment in as the location param and we will do our best to geocode it. "Seattle, WA" is more likely to return more accurate results than just "Seattle" in case there happen to be multiple cities named Seattle.

Best,
Doug
--
Doug Petkanics | @petkanics
Co-founder at Hyperpublic

H K

unread,
Oct 11, 2011, 1:40:07 PM10/11/11
to Hyperpublic API Developers
My URL was missing &. Thanks you Eric. Now it works.

HK

On Oct 10, 6:25 pm, Eric Tang <et...@hyperpublic.com> wrote:
> Hi HK,
>
> From the url, I see that you are passing in lat=47.61lon=-122.33.
> Lat and Lon are actually 2 separate parameters.  You should be able to solve
> your problem by adding a "&" in between.
>
> Tryhttps://api.hyperpublic.com/api/v1/places?lat=47.61&lon=-122.33limit=20<https://api.hyperpublic.com/api/v1/places?lat=47.61lon=-122.33limit=20>
> (add your client_id and client_secret)
>
> Cheers,
> Eric Tang
>
>
>
>
>
>
>
> On Mon, Oct 10, 2011 at 8:44 PM, H K <hkim3...@gmail.com> wrote:
> > Hi
>
> > I am trying to use the Places+ API to search for places. It seems to
> > me the API didn't consume the latitude and longitude parameters I
> > passed in
>
> > For example, with
> >https://api.hyperpublic.com/api/v1/places?lat=47.61lon=-122.33limit=20
> > (client_id and client_secret removed)
> > what I got are some places in Los Angeles area, while the coordinate
> > 47.6,-122.33 is in Seattle:
>
> > [{"locations":[{"name":"5301 Beach Blvd, Buena Park, CA
> > 90621","lon":-117.996940612793,"city":"Buena
> > Park","country":"US","postal_code":"90621" ...
>
> > I found out, however, I can add a "location" parameter to force the
> > results to be in Seattle:
>
> >https://api.hyperpublic.com/api/v1/places?lat=47.61lon=-122.33limit=2...
Reply all
Reply to author
Forward
0 new messages