Description
Preconditions (*)
- Magento version - 2.4.4-p6
- Magento Page Builder version - 2.2.2-p6
Steps to reproduce (*)
- In admin panel add a new block or edit an existing one
- Add a Map from Media Tab
Expected result (*)
Map is displayed:
Actual result (*)
Error occurs:
The same is displayed on the website after saving a block where the map should be.
In console there's an error about overriding Array.from() which supposedly conflicts with Prototype.js - https://stackoverflow.com/questions/76955952/array-from-with-an-implementation-that-doesnt-support-iterables-google-maps
Though the error persists after the fix below, the map is visible (see screenshot from expected result section)
After making changes in vendor/magento/module-page-builder/Block/GoogleMapsApi.php:20 from:
const GOOGLE_MAPS_LIBRARY_URL = 'https://maps.googleapis.com/maps/api/js?v=3&key=%s';
to:
const GOOGLE_MAPS_LIBRARY_URL = 'https://maps.googleapis.com/maps/api/js?v=3.53&key=%s';
the map is shown