Google Maps Cannot Be Used In Lightning Web Components
Recently I was tasked with investigating which 3rd-party mapping solutions can be used within Salesforce lightning web components. And boy-oh-boy is there a lot of misinformation out there. Especially on the topic of using Google Maps within LWCs. I’ll start by saying this: you cannot use Google Maps in LWCs (Visualforce is still an option though). The odd thing is that several, high-ranking (in Google Search) blogs say you can. Some even have code samples! I have a theory on why this is the case. If you ask the most used AI tools out there many will declare that you can indeed use Google Maps within LWCs. And I suspect that bloggers who didn’t know better ran with this answer and started generating content and code from those AI tools. Once again, you cannot do this. There is no secret tag you can include in the markup. No, you cannot …