1

I have this map component that shows the info window when one clicks on a marker but the nothing happens when I put the same component in communities. Is there an extra configuration step I need to do?

The zoom buttons aren't clickable either.

Here is the map in developer orgcorrect map

The same map in communities -marker is not even clickable enter image description here

Thanks!

7
  • please check the developer tools/console for any warning/errors when you click on the marker.
    – glls
    Commented May 18, 2021 at 12:29
  • The marker is not clickable. The hand pointer does not show on hovering over the marker. No errors/warnings in the console.
    – Pauline
    Commented May 18, 2021 at 12:40
  • and when you load the page, any console errors/warnings ?
    – glls
    Commented May 18, 2021 at 12:42
  • no errors on loading the page.
    – Pauline
    Commented May 18, 2021 at 12:44
  • The markers are loading ok. Its just that they are not clickable.
    – Pauline
    Commented May 18, 2021 at 12:48

2 Answers 2

1

I found the issue.

The map does not work in preview mode but after publishing the site the map is now clickable. Such a small thing!

0

Yes there is an extra step! You need to allow the maps.a.forceusercontent.com in your CSP settings in Experience Builder.

lightning-map loads content from the Salesforce domain maps.a.forceusercontent.com in an iframe. Allow maps.a.forceusercontent.com if you use this component in your own domain and you use the Content Security Policy frame-src directive, such as in Experience Builder sites or Lightning Out. For more information, see Content Security Policy in Experience Builder sites.

Pic here in case the link gets broken: enter image description here

Source is here

2
  • Thanks Casper. I already had that set up. I had used.. https://*.forceusercontent.com
    – Pauline
    Commented May 18, 2021 at 9:13
  • I am wondering if I need to define a property in target config in the meta-xml file. But I am not sure what I would use to define the property.
    – Pauline
    Commented May 18, 2021 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .