FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
108 stars 18 forks source link

Google Maps API not being correctly loaded in web #2804

Open adamrUK84 opened 2 months ago

adamrUK84 commented 2 months ago

Has your issue been reported?

Current Behavior

When publishing a web app that makes use of Google Maps the API is not being loaded correctly and is producing the following error in the console:

Google Maps JavaScript API has been loaded directly without loading=async. This can result in suboptimal performance. For best-practice loading patterns please see https://goo.gle/js-api-loading

Expected Behavior

The script included in the index.html file needs to be written to include &loading=async after the key.

Current script in index.html

Should be written:

Steps to Reproduce

  1. Create new page; 2. Set up Google Maps with API keys in FF; 3. Add Google Map to page; 4. Publish to Web.

I have downloaded the code, edited the index.html as above (in expected behaviour) and self published and this removes the console error.

Reproducible from Blank

Bug Report Code (Required)

IT4wi+fqxItNtbxa1s+NY8dV/TwWGDs2U5EvidZHSis8JL7oPOwifPfDN0pvTL3gTWx2JmC0kmY1xvfqht7DKPYDA0uBGog6/rlUWArxeE6gM5uVBs67fW1SJ5hnGnK+0aaNsQpTJu9YLFVnwUOIHfORdBDfQ5DUCkgZJcq1JdeK2SrDX1iXc2URm05KZDPz

Context

The map works but I'd like to tidy up console errors like this as it appears to be a straightforward fix.

Visual documentation

As above.

Additional Info

No response

Environment

- FlutterFlow version: 4.1.40
- Platform: Web
- Browser name and version: Chrome Version 124.0.6367.62 (Official Build) (arm64)
- Operating system and version affected: MacOS 14.4.1 (23E224)

General

Relative to the time the changes were made, data was lost within

When following my steps to reproduce, data loss happens

ignalauret commented 2 months ago

Hey @adamrUK84 thanks for your report. I can confirm the issue that you are describing, so I will send a ticket to our technical team to apply the change that you are suggesting if they see fit. In any case, they will keep you updated on this thread. Have a great day!

adamrUK84 commented 2 months ago

Thanks @ignalauret that's great.