Does anyone have a working example of a JavaScript I could compare notes to to obtain nearby Google Map places by Type without the need to display the results on the map?
Or how best should I accomplish this?
Seth wrote:
Waseema wrote:
Hi Seth,
sample app is here
Please refer this forge Component for more details.
https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=3959&ProjectName=google-places-mobile&Unfollow=False
Hope this helps.
Thanks,
Waseema.
Dear Waseema
Thank you for your swift reply.
It appears your solution is mainly for AutoComplete Places, whereas I'm looking for one searching for TYPES of NEARBY Places without the need and prerequisite to use the map or display the results on the map.
Basically, I'd like to compare my JavaScript with someone else's to see how theirs is coded to retrieve a list of nearby places based on the user sending current GeoLocation points, radius in meters and place TYPE as input parameters.
Since my Java coding and use of Google Map APIs are self taught and not too strong, I suspect I stuffed up something somewhere, as my query returns blanks in spite of widening the radius of the known geographic area I know for a fact has those landmark places.
Is there anybody out there with suggested JavaScript logic to retrieve nearby location places using only Google map key and specifying radius + place type and current location's coordinates?
Much appreciated
Seth
I guess we were looking for the same thing, take a look at the documentation of the Google Maps - Places API ( https://developers.google.com/places/web-service/search ).
Ive managed it to consume the following REST API: https://maps.googleapis.com/maps/api/place/nearbysearch/json?location={Latitude},{Longitude}&type={PlacesType}&radius={PlaceRadius}&key={ApiKey}
Where you need the specify the following Input Parameters:
- Latitude
- Longitude
- PlacesType ; ( Example: Bar, Embassy, Hospital - For supported types take a look in the following url: https://developers.google.com/places/web-service/supported_types )
- Radius ; Radius in Meters where to look
- ApiKey
This service will return JSON results and place them into the 'results' array.
Regards,
Sylber
Sylber Gashi wrote:
Much appreciated. Problem solved