T
T
tuguno2016-07-30 01:51:22
PHP
tuguno, 2016-07-30 01:51:22

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

1 answer(s)
T
tuguno, 2016-07-30
@tuguno

Did no one understand the documentation of the great Google? xD

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question