简体   繁体   English

在Gmap中使用地理位置定位多个经纬度

[英]multiple latitude and longitude using Geo location in Gmap

I want to fetch multiple Latitude and Longitude using Google Geo API.Actually I am using GMap module to render a map in which i am fetching business listing address from database but now i want to display google Listing also. 我想使用Google Geo API来获取多个经度和纬度。实际上,我正在使用GMap模块来呈现地图,在该地图中,我正在从数据库中获取商户列表地址,但现在我也想显示Google列表。 example: http://maps.google.com/maps/geo?q=bars;near=chicago&radius=500&output=csv&key= ' . 例如: http : //maps.google.com/maps/geo?q=bars;near=chicago & radius=500 & output=csv & key= '。 $key it returns a single Latitude and Longitude but i want all latitude and longitude of bars type near chicago. $ key它返回一个单一的纬度和经度,但是我要在芝加哥附近输入所有条形的纬度和经度。 Please help me on this.I would appreciate your comments. 请对此提供帮助。感谢您的评论。

The geocoder geocodes postal addresses, and bars;near=chicago is not an address. 地理编码器对邮政地址和地址进行地理编码bars;near=chicago不是地址。 The result you're getting is for q=something,Chicago , which is the nearest the geocoder can manage for your query. 您得到的结果是q=something,Chicago ,这是地理编码器可以为您的查询管理的最接近值。 In fact it's not even finding the city: the result is for Chicago Avenue, Massapequa NY. 实际上,它甚至没有找到城市:其结果是纽约马萨佩夸的芝加哥大道。

What you want to use is the Places API . 您要使用的是Places API This is designed to return results of a certain class, based around a location. 旨在根据位置返回某个类的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM