Problem with calls to places

25 views
Skip to first unread message

goexuma

unread,
Nov 17, 2011, 4:32:00 PM11/17/11
to google-map...@googlegroups.com
I am using the places api, an experiencing inconsistent results.

Basiclly, what I am doing is putting a bounds box around an area and asking places to return all the points inside the bounds.  Places always misses locations.

My target is Exuma in the bahamas. the maximum number of places is around 150. but I usually get 50 or 60 points.

Does the places api have a maximum number of entries that can be returned in one call.

Any help or suggestions would be appreciated.

Thanks

 

Rossko

unread,
Nov 17, 2011, 6:46:46 PM11/17/11
to Google Maps JavaScript API v3
> Does the places api have a maximum number of entries that can be returned
> in one call.

You could try the documentation I suppose
http://code.google.com/apis/maps/documentation/places/#PlaceSearchResponses
" The Places API returns up to 20 establishment results. Additionally,
political results may be returned which serve to identify the area of
the request. "

goexuma

unread,
Nov 17, 2011, 8:44:50 PM11/17/11
to google-map...@googlegroups.com
Thanks so much, thats the problem.

I read the documentation, but missed that line.

Do you have any suggestions about how to retrieve more than 20 results.

I was thinking of creating an arry of lat/lng boxes and then loop through them as a way around the limit of 20.

Thanks

Rossko

unread,
Nov 17, 2011, 8:53:52 PM11/17/11
to Google Maps JavaScript API v3
> Do you have any suggestions about how to retrieve more than 20 results.

Not really. They set the limit to prevent abuse.

> I was thinking of creating an arry of lat/lng boxes and then loop through
> them as a way around the limit of 20.

You'll need to read this part of the docs too
http://code.google.com/apis/maps/documentation/places/#Limits
Note that unmentioned, but implied, is a limit on rate of requests as
well as daily volume.

goexuma

unread,
Nov 17, 2011, 9:15:27 PM11/17/11
to google-map...@googlegroups.com
I read the documentation you suggested, and I think I am ok.  I only need to retreive the place locations on a month or so.  I am guessing that there is no more than 200 places in total.

Thanks again

Rossko

unread,
Nov 18, 2011, 4:43:33 AM11/18/11
to Google Maps JavaScript API v3
> I read the documentation you suggested, and I think I am ok.  I only need
> to retreive the place locations on a month or so.  I am guessing that there
> is no more than 200 places in total.

So you just want to scrape and save Google's data for a given area?

JKurtock

unread,
Nov 19, 2011, 10:51:26 AM11/19/11
to Google Maps JavaScript API v3
If you know in advance that your universe is 200 places (or 500 or
2,000), you can very effectively create your own database and serve it
any way you want. Indeed, Google makes that almost trivial with
Fusion Tables. You can return as many "places" as you want in a
request, and you can assure yourself that all the entries are
accurate.
Reply all
Reply to author
Forward
0 new messages