Google Maps JavaScript API loading multiple times

Bubble loads additional map libraries the instant I attempt to set the state of a Geolocation variable, regardless of what map element I’m using. However when I’m using the Google Maps + W3W plugin this causes a conflict. Is this a bug?

I am using the Google Maps + W3W Plugin and everything works great. That is until I attempt to set the state of a Geolocation variable on my page. At this point Bubble instantly loads additional libraries (highlighted) causing a conflict.

My Google Maps keys are setup as suggested by Bubble here.

How do I prevent the API from loading twice?

For anyone else wondering this appears to be a lazy loading issue. I have simultaneously addressed this with the plugin author who I believe has solved my issue here.

Short version, for performance Bubble waits to load resources when needed. By contrast the plugin checks for what’s already loaded and then loads anything missing. If the plugin loads “missing” resources and then Bubble encounters a need for the same resources it (apparently) loads them without checking, creating a conflict.

Solution, Ensure any resource needs are called at page load (hidden if necessary) to prevent the plugin from loading the same resources. In my case I’m hiding a Search input box.

This topic was automatically closed after 70 days. New replies are no longer allowed.