Laurence
Laurence

Reputation: 381

Google Maps API - Nearby Location Search

I'm having a tough time with the Google Maps API. What I'm looking to do is have the google maps lookup my location on page load, then show a list of "X" where X is type of restaurant. So for example the X would be pre populated with Pizza, so on page load the browser would lookup the location then automatically show a list of Pizza places nearby on the map.

Upvotes: 2

Views: 22123

Answers (1)

Cormac Driver
Cormac Driver

Reputation: 2521

Take a look at the textSearch method in the Places Library, details below:

https://developers.google.com/maps/documentation/javascript/places#TextSearchRequests

This lets you return results for a text query e.g., "pizza", within a certain area.

Upvotes: 4

Related Questions