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.

Location and Bounds do not work as specified in documentation

See original GitHub issue

According to the documentation, the following request constraints should work.

const autocompletionRequest = { componentRestrictions: { country: 'us' }, location: { lat: Number(40.7128), lng: Number(74.0060) }, radius: 5 }

I am receiving the error: ‘Uncaught (in promise) TypeError: a.lat is not a function’ back from Google places API. I believe the code processing the location and creating the google.maps.LatLng object may have an issue. I was experiencing the same issue while creating bounds.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Tintefcommented, Jul 16, 2019

@AxelAli @dextercallender

This fix works 🎉 I’ll merge and update the package so you can give it try!

Let me know if this doesn’t work for any of you guys.

Note: @dextercallender your lat/lng coordinates are for somewhere in China (just so you know)

0reactions
Tintefcommented, Jul 25, 2019

Thanks for stepping over again @AxelAli

Also @dextercallender, it’s always helpful to see your code, so we know what are you doing. A codepen or similar to reproduce what you are doing would be awesome too

Read more comments on GitHub >

github_iconTop Results From Across the Web

bounds | Apple Developer Documentation
The bounds rectangle, which describes the view's location and size in its own ... The coordinates of the bounds rectangle are always specified...
Read more >
Restricting Map Bounds | Maps JavaScript API
This example creates a map that starts in Auckland, New Zealand. The map is restricted to New Zealand. The user can pan away...
Read more >
Google Map API v3 — set bounds and center - Stack Overflow
I'm working of a simple example which plots markers from an array, however I do not know how to center and zoom automatically...
Read more >
Control.Bounds Property (System.Windows.Forms)
Gets or sets the size and location of the control including its nonclient ... The Bounds property is not always changed through its...
Read more >
Scripting API: Renderer.bounds - Unity - Manual
When you set custom world bounds, the renderer bounding volume no longer automatically tracks Transform component changes. If there is a local space ......
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