开发者

Is it possible to create an InfoWindow using the Google Maps API V3 that is populated via Google?

If one puts in an address or set of coordinates into Google Maps (the web interface), it will create a set of one or more markers representing your search results on the map. You can click these markers to show an information callout that has data such as the phone number or reviews of the place.

I'd like to emulate this feature in a map on a web page I am building using Google Maps V3. I have successfully created a marker with custom icon and invoked an InfoWindow but I have to specify the content myself. Is there a way I can get the InfoWindow content for that street address/place as you would if you used Google Maps directly? I've seen a few refere开发者_运维问答nces to the Google Places API, but I would have to extract and style the information myself which would require more time than I have in my budget. Is this the only way?

Thanks,

Steve


You need to do some reverse geocoding

http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding

Here is an example:

http://code.google.com/p/gmaps-samples-v3/source/browse/trunk/io-2010-bootcamp/v3-reverse-geocode.html?r=204

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜