Google Maps JavaScript API errors in Chrome

Platform: Website

Browser, if a website issue: Chrome (and only Chrome)

URLs of any relevant observations or pages: https://www.inaturalist.org/photos/118593957

Screenshots of what you are seeing:

Description of problem:

Step 1: Browse to the page above

Step 2: Click the place on that page

Step 3: As the page loads, two identical JavaScript errors are issued, but the page seems to load in any case

Here’s a copy of the output from the JavaScript Console:

js?v=3.48&key=AIzaSyDsHVgl1tZrI_tlyI8Rg6n6SUEvSHQjfkE&libraries=places,geometry,drawing:248 Loading the Google Maps JavaScript API without a callback is not supported: https://developers.google.com/maps/documentation/javascript/url-params#required_parameters
iea @ js?v=3.48&key=AIzaSyDsHVgl1tZrI_tlyI8Rg6n6SUEvSHQjfkE&libraries=places,geometry,drawing:248
2js?v=3.48&key=AIzaSyDsHVgl1tZrI_tlyI8Rg6n6SUEvSHQjfkE&libraries=places,geometry,drawing:119 

InvalidValueError: setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lat: NaN is not an accepted value
_.me @ js?v=3.48&key=AIzaSyDsHVgl1tZrI_tlyI8Rg6n6SUEvSHQjfkE&libraries=places,geometry,drawing:119
api.inaturalist.org/v1/places/nearby?swlat=NaN&swlng=NaN&nelat=NaN&nelng=NaN&lat=NaN&lng=NaN:1          

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
api.inaturalist.org/v1/places/nearby?swlat=36.13324421457946&swlng=-84.19921757653356&nelat=36.30685832351446&nelng=-83.97988546639681&lat=NaN&lng=NaN:1          

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
util.js:64 

Google Maps JavaScript API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version

Pretty sure this is the same bug that this issue describes: https://github.com/inaturalist/inaturalist/issues/3641

Fwiw, this is an old problem, I just haven’t got around to reporting it until now. It started around the time the rectangle and circle tools were added to the map on the observations page.

1 Like

Yeah, I noticed it then as well.

for what it’s worth, i don’t think you can specify just a lat and lng parameter without also specifying a radius to go with it. it looks like the page will sometimes set some sort of default radius if you don’t specify one, but it doesn’t seems very consistent about it.

Also fwiw, I usually type in radius=1 after the fact. That’s my default.