Answer the question
In order to leave comments, you need to log in
How to use (regions) in Google Maps API?
Description from Google:
The options argument, which can contain the following properties:
An array of types that specifies an explicit type or a collection of types listed below. If you omit this parameter, all types are returned in the search results. Usually only one type is allowed. The exception is the types geocode and establishment , which can be specified together, but this is equivalent to the absence of the specified types. The supported types are:
geocode - Tells the Places service to return only geocoding results, not organization names.
address - Restricts Places search results to geocodes with exact addresses.
establishment- Limits Places search results to organizations.
(regions) is a wildcard type hint that restricts search results to places corresponding to the following types:
locality ,
sublocality ,
postal_code ,
country ,
administrative_area1 ,
administrative_area2 .
Question:
How can I use (regions)? Where to stick it?
var input = document.getElementById('searchTextField');
var options = {
bounds: defaultBounds,
types: ['establishment']
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question