Luca
Luca
Top Bug Hunter
 · Founder | CTO

Google Maps (Places) - No results

Resolved

Hi folks,

I have a Google Maps map on a page.
Below it I have a button.

If you click on the button, all cafés within a radius of 2km should be displayed.
If the user clicks the button, an API request is sent.

Expectation: All cafés within a radius of 2km as markers on the map
Error message: Uncaught TypeError: Cannot read properties of null (reading 'slice')

API Request (on button click)

Save results to app state (on button click)

Function (listDoubleToLatLng)

Testing API Request (successfull)

Error Message

Does anyone have a solution for this?
I watches these two videos for that case
- https://www.youtube.com/watch?v=wvyiD314RLA
- https://www.youtube.com/watch?v=29Oz0LI8j68

But nothing seems to work 😔

1
6 replies