Google地图API,如何在整个城市中获取服务(文本搜索)或查看地图的整个部分 [英] Google Maps API, How to Get Services (text Search) in Whole City or the whole portion of map that is in view

查看:206
本文介绍了Google地图API,如何在整个城市中获取服务(文本搜索)或查看地图的整个部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用

  var request = {
位置:placeobject,
半径:50000,
查询:placetypes
//类型:placetypes
};
infowindow = new google.maps.InfoWindow();
var service = new google.maps.places.PlacesService(map);

但是我得到的是在我发送位置附近堵塞的大量服务,但是如何指定文本搜索标记所有这些服务在整个城市或更广泛的区域进行搜索。

我得到的屏幕截图是

解决方案

整个城市。



textSearch nearBySearch 限定为总计60个结果,在 20人组中。


默认情况下,每个地方搜索每个查询最多返回20个建立结果;然而,每个搜索可以返回多达60个结果,分成三个页面。


radarSearch 将返回200条结果,但细节不多。


通过调用PlacesService的radarSearch()方法启动Places Radar Search,该方法将返回最多200个PlaceResult对象的数组。 radarSearch()返回的PlaceResult对象将只包含geometry.location和reference属性。



When I did a Text Search with

var request = {
    location: placeobject,
    radius: 50000,
    query: placetypes
//  types: placetypes
};
infowindow = new google.maps.InfoWindow();
var service = new google.maps.places.PlacesService(map);

But All I Get is the chunk of services clogged near the location i send, but how to specify text search to mark all such services in the whole city or a wider region to be searched.

Screenshot of what i get is

解决方案

You can't get "the whole city".

textSearch and nearBySearch are limiited to 60 results total, in groups of 20.

By default, each Place search returns up to 20 establishment results per query; however, each search can return as many as 60 results, split across three pages.

radarSearch will return up to 200 results, but with less detail.

A Places Radar Search is initiated with a call to the PlacesService's radarSearch() method, which will return an array of up to 200 PlaceResult objects. PlaceResult objects returned by radarSearch() will only include the geometry.location and reference properties.

这篇关于Google地图API,如何在整个城市中获取服务(文本搜索)或查看地图的整个部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆