Being this isn't technically a bug I've opened this issue as a feature request.

Each time a gmap loads via geofield_map browser console gives warning saying the maps API should be loaded using async.

So here is a patch that adds async when gmaps api is used. Super simple just added + '&loading=async' to the scriptPath in geofield_map_gmap_formatter.js and geofield_map_widget.js making this
scriptPath += '&key=' + gmap_api_key + '&loading=async';

As near as I can tell this doesn't break anything...

CommentFileSizeAuthor
async-load-for-gmaps-geofield-map.patch882 bytessidgrafix

Comments

sidgrafix created an issue. See original summary.

sidgrafix’s picture

Issue summary: View changes

itamair’s picture

Status: Active » Fixed

Thanks @sidgrafix ... nice catch and fix.
I slightly changed it, but committed still crediting it to you.
This fix will be part of next Geofield Map module release ...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.