delahaye / dlh_googlemaps

Google Maps Extension für Contao
20 stars 26 forks source link

Support the `|async` flag #45

Closed katgirl closed 9 years ago

katgirl commented 10 years ago

Contao 3.4 will support an |async flag for scripts in $GLOBALS['TL_JAVASCRIPT'], see contao/core#7172 and contao/core@f3bf1a4

delahaye commented 9 years ago

Ist drin.

katgirl commented 9 years ago

83206e1e27cf5f0b2c38c51a5056ee93a97be271

delahaye commented 9 years ago

Ist wieder raus - machte Probleme.

katgirl commented 9 years ago

müsste das nicht auch wie folgt lauten:

$GLOBALS['TL_JAVASCRIPT'][] = 'http'.(\Environment::get('ssl') ? 's' : '').'://maps.google.com/maps/api/js?v=3.exp&callback=initialize&language='.$arrMap['language'].'&sensor='. ($arrMap['sensor'] ? 'true':'false') . '|async';

siehe: https://developers.google.com/maps/documentation/javascript/examples/map-simple-async

bastlwastl commented 8 years ago

Ich habe es bei mir so eingefügt:

$GLOBALS['TL_JAVASCRIPT'][] = 'http'.(\Environment::get('ssl') ? 's' : '').'://maps.google.com/maps/api/js?key='.$objRootPage->dlh_googlemaps_apikey.'&language='.$arrMap['language'] .' '.async .' '.defer;

Ist das so machbar? Konnte bis jetzt keine Probleme feststellen.

Gruß Bastian