hsemarap
hsemarap

Reputation: 227

Google Maps API, How to Get Services (text Search) in Whole City or the whole portion of map that is in view

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 enter image description here

Upvotes: 1

Views: 2471

Answers (1)

geocodezip
geocodezip

Reputation: 161384

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.

Upvotes: 2

Related Questions