question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Settings types in options to cities not working

See original GitHub issue

I am trying to set the types in the options parameters to limit the search to just cities.

const options = {
  location: new google.maps.LatLng(85, -180),
  radius: 5000,
  types: ['cities']
}

When I do this, I receive INVALID_REQUESTS from the onError callback.

I am following the docs and those are one of the options.

What am I missing?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

7reactions
quachsimoncommented, Nov 15, 2017

@cicer1 It wasn’t obvious but, I had to wrap it around parentheses exactly like the docs (cities) so you would have to put it like so: types: ['(cities)']

3reactions
itsmhuangcommented, May 31, 2019

This is still broken or broken again. Setting types: ['(cities)'] doesn’t limit the search results to cities, the search results still returns all types.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Select other route options in Maps on iPhone - Apple Support
Select other route options in Maps on iPhone. With a route showing in the Maps app , you can select various options before...
Read more >
Change the Windows regional settings to modify the ...
Change the regional settings · Click the Start button, and then click Control Panel. · Click Clock, Language, and Region, and then click...
Read more >
Understand & manage your location when you search on ...
If you want to learn more about how location works before changing your settings, below you'll find info on how Google determines location...
Read more >
Changing the Pop-up Blocker Settings in Chrome, Firefox, or ...
Changing the Pop-up Blocker Settings in Chrome, Firefox, or Internet Explorer ... Under "Pop-ups," select an option: Do not allow any site to...
Read more >
Change location settings | Android Developers
For details of all available location request options, ... With this setting, your app does not trigger any location updates, but receives locations ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found