Google Maps has suddently stopped working

I have a site which has been live for a long time and working perfectly but the Google Maps has suddenly stopped working.

The map should show about 200 dynamic markers, it should be zoomed onto the UK and the search for movers within a radius will update the view accordingly. And it was working fine with the device location automatically being used as well as entering an address or post code.

I can’t see any indication of what the cause might be in the dev console. The API key seems to be fine in the Google Cloud Console.

Can anyone help me at all with this?

I’ve not made any changes to the site recently.

Hey Jon,

Stopped working, means what? The map doesn’t work at all? The map works but no markers? Or what else?
Any error in your console?

The map centres on somewhere near Republic of the Congo (instead of the UK) and there are no markers. Basically, there seems to be a disconnect between the site and the map. And it’s affecting maps on other pages (eg. https://www.moveassured.com/member/essex-house-removals)

There are errors in the console but they’re not very helpful hence me asking for assistance.

Haven’t used google maps…
But I guess it must be related to the connected account…
Maybe a minor terms change or update from Google?
Can you investigate the google account and the connection for the site/map as you said?

I see you use the latest beta, seems there is a typo in the code.

Here an update: dmxGoogleMaps.zip (28.5 KB)

2 Likes

Thanks @patrick. That’s fixed some of it. Might there be another typo somewhere? The main map with markers is still not populating. The console is down to just one error now.

I’ve rolled back to the stable version and it’s working again. This will get me out of trouble for now at least.

Can you tell me the error that you still had with the new beta?

BaseComponent.js:55

TypeError: Cannot read properties of undefined (reading 'setCenter')
    at n._geocode (googleMaps.js:547:1)
    at n.render (googleMaps.js:355:1)
    at n.constructor (BaseComponent.js:46:1)
    at n (api.js:5:1)
    at t.hasOwnProperty.t.constructor (api.js:47:1)
    at new n (api.js:5:1)
    at n.$createChild (BaseComponent.js:135:1)
    at n.<anonymous> (BaseComponent.js:256:1)
    at Object.walk (dom.js:186:1)
    at Object.walk (dom.js:191:1)

Thanks, there was indeed another small typo in the code.

dmxGoogleMaps.zip (28.5 KB)

2 Likes

Thanks again. I’ve switched back to the beta channel and replaced those files and it looks to be working nicely.

1 Like

When scripts are updated like this, does it need to wait until the next Wappler release before the fix is included or does the on-the-fly updates work in this scenario? I’ve replaced the files but the updater says they need updating again because they don’t match and I recall you adding the facility for changes like this to happen between versions.

The fix will be included in the next update.
Ignore the project updater messages for this file, until the next update.

Thanks Teodor. But am I right about the between-version updates? I’m cool with ignoring it for now as it will only be a couple of days but I wanted to confirm you have the facility to update files on the fly without waiting for a version update.

Yes, we can update extensions on the fly without a Wappler app update, but in this case the update will be included in the next Wappler version.

1 Like

It looks like there’s still a bug in there somewhere. The get location isn’t working in this version so I’ve gone back to stable again and then it’s working. No errors were in the console, though.

Please report different issues in different topics. There’s no get location functionality in Google maps, so explain the problem in a different topic.

Fixed in Wappler 6.1.3

This topic was automatically closed after 47 hours. New replies are no longer allowed.