-1

I get the below error message when I use Google Maps JavaScript API:

This site overrides Array.from() with an implementation that doesn't support iterables, which could cause Google Maps JavaScript API v3 to not work correctly.

What causes this? And how do I fix this? Could this be the reason why Google Map is not displaying although the API Key is checked?

user12099607
  • 11
  • 1
  • 4
  • Does this answer your question? [Google Maps JavaScript API v3 to not work correctly](https://stackoverflow.com/questions/58158510/google-maps-javascript-api-v3-to-not-work-correctly) – gre_gor May 11 '20 at 19:15

3 Answers3

0

you can write a custom Polyfill for the Array.From:

Step 1: Download the file from the link:- arrayFrom.ts

Step 2: Save it somewhere in your project.

Step 3: Give the file path in your polyfills.ts file just like I did it:

import 'src/app/library/custom-polyfills/arrayFrom';

I hope this will solve your problem :) .

-1

You have not specified the other JS Libraries that your project is using. This is actually an issue on IE11 with Google Maps Version of 3.37. You can check here

This error might also come if your project is using core-js. Reference Here

ascsoftw
  • 3,466
  • 2
  • 15
  • 23
-1

It seems this a compatibility issue with ES6 implementation and "Array.from()" as mentioned in this comment.

rafon
  • 1,469
  • 11
  • 21
  • Please see my comment in https://stackoverflow.com/questions/58158510/google-maps-javascript-api-v3-to-not-work-correctly/58703775#58703775 – rafon Nov 05 '19 at 02:49
  • is there actually a workaround for this? I'm still getting this error using a common Polyfill, but I'm not sure how to fix it (IE 11) – Andrew Newby Jan 18 '20 at 13:59