最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Google Places API - Places Details Request - Stack Overflow

programmeradmin0浏览0评论

I'm using the Google Maps & Places api's for a website.

I'm trying to get the details of places (phone numbers, websites, names, addresses, ratings etc.) within a certain radius. I'm struggling to understand how the Google Places Details Request works and I'm hoping someone can give me a pointer to a good tutorial or nudge me in the right direction with some advice.

This is the documentation that google provides:

I can get markers to display on my map using javascript (using the google.maps.marker overlay) and I want to be able to get the details of the place in a similar way. Currently if i click any marker the only details I get are the name. Ideally I want a list of the information above to be displayed as well.

I guess my question is this: is it possible to get the details of a place using javascript?

I'm a new to both Javascript and the google api's but should hopefully be able to follow along.

I apologise if this question seems vague, I'm tired and my brain isn't functioning properly. If anyone thinks they can help and needs some more details please give me a shout.

All help and advice gratefully accepted!

thanks

JA

I'm using the Google Maps & Places api's for a website.

I'm trying to get the details of places (phone numbers, websites, names, addresses, ratings etc.) within a certain radius. I'm struggling to understand how the Google Places Details Request works and I'm hoping someone can give me a pointer to a good tutorial or nudge me in the right direction with some advice.

This is the documentation that google provides: http://code.google./apis/maps/documentation/places/#PlaceDetailsResults

I can get markers to display on my map using javascript (using the google.maps.marker overlay) and I want to be able to get the details of the place in a similar way. Currently if i click any marker the only details I get are the name. Ideally I want a list of the information above to be displayed as well.

I guess my question is this: is it possible to get the details of a place using javascript?

I'm a new to both Javascript and the google api's but should hopefully be able to follow along.

I apologise if this question seems vague, I'm tired and my brain isn't functioning properly. If anyone thinks they can help and needs some more details please give me a shout.

All help and advice gratefully accepted!

thanks

JA

Share Improve this question asked Mar 1, 2012 at 0:08 JimJim 7333 gold badges12 silver badges28 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

I believe you are looking for The Google Places JavaScript library which can be found here: http://code.google./apis/maps/documentation/javascript/places.html

You will be able to achieve what you are asking by performing a Place Search using this library. An example is available on the page.

Goodluck

Chris

发布评论

评论列表(0)

  1. 暂无评论