function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vinod Merwade27Vinod Merwade27 

Google Map API into Lightning

Hi All,

I'm trying to integrate Google map API into Lightning component. 
I'm getting error in console.

aura_proddebug.js:13440 Refused to connect to 'http://maps.googleapis.com/maps/api/geocode/json?latlng=12.9715987,77.5945627&sensor=true' because it violates the following Content Security Policy directive: "connect-src 'self' 

Please let me know how to get over this error ?

Does Lightning allow Google API's to be integrated. ?

Thanks,
Vinod 
Best Answer chosen by Vinod Merwade27
SandhyaSandhya (Salesforce Developers) 
Hi Vinod Merwade,

Google maps (or any library that loads its dependencies similarly) is currently not supported inside of lightning .You can vote for this idea

https://success.salesforce.com/ideaView?id=0873A000000LlVWQA0

But I have seen some workarounds for this please refer below post for similar discussion.

https://developer.salesforce.com/forums/?id=906F0000000ApfuIAC
 
Hope this helps you!

Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
 
Thanks and Regards
Sandhya