[SalesForce] Is the integration of Google Maps and Lightning impossible because of the restrictive Content Security Policy

Attempting to fiddle with Lightning Components I ran into Lightning's super restrictive static resources limits.

Any attempt to load the Google Maps API fails with the following error:

Refused to load the script 'https://maps.gstatic.com/maps-api-v3/api/js/21/9a/visualization.js' because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension: 'unsafe-eval' 'unsafe-inline' https://ssl.gstatic.com/accessibility/".'

After doing some of my own research, it appears no matter what you do, Lightning will not let you load any external JS libraries.

Has anyone else run into this issue and been able to overcome it?

Best Answer

Google maps (or any library that loads its dependencies similarly) is currently not supported inside of lightning

Related Topic