Skip to content

problem with initMap in Chrome #344

Description

@adanora

Hello,

I've installed the extension but to make it work in Chrome, (Linux Version 138.0.7204.92 (Official Build) (64-bit)) I had to modify LoadAssets.html like this

        <f:asset.script identifier="maps2-google-maps"
                        src="EXT:maps2/Resources/Public/JavaScript/GoogleMaps2.min.js"
                        defer="1"
                        inline="0"
                        useNonce="1"/>

        <f:asset.script identifier="maps2-google-maps-api"
                        src="https://maps.googleapis.com/maps/api/js?key={environment.settings.googleMapsJavaScriptApiKey}&callback=initMap&libraries=places"
                        defer="1"
                        inline="0"
                        useNonce="1"/>

changing assets order and resplace async="1" with defer="1" in both assets

this keeps load order (loading initMap before needed) and don't block execution.

versions:
"typo3/cms-core": "^13.4.0"
Maps2: 12.0.8

without this, it worked in Mozilla but failed most of the time in Chrome with error:
Uncaught (in promise) InvalidValueError: initMap is not a function
does any one confirms this?

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions