Location and Bounds do not work as specified in documentation
See original GitHub issueAccording 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:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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)
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