1

We are building a Google Data Studio Community Visualization and need to draw geographic features on a base map. The Google Data Studio default map component does not support geographic data for example Geojson. To build this feature, I tried Openlayers and Leaflet. Both of them work fine on local env but not Production environment. The error is

Refused to load the image 'https://a.tile.openstreetmap.org/13/4093/2723.png' because it violates the following Content Security Policy directive

I found this post by Community Visualization. It seems loading external image, in this case the base map tile, is not a feature of Community Visualization. So, is there anyway to implement a map to Community Visualization?

zhangjinzhou
  • 2,461
  • 5
  • 21
  • 46
  • Have you ever found a solution to this problem? – Cristian Vrabie Aug 31 '23 at 23:31
  • If you need a legitimate source which is not external you would be limited to using the Google maps API. Using an OpenLayers or Leaflet XYZ source configured with the old Google tile url `https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}` as in https://stackoverflow.com/questions/34311747/whats-the-url-to-download-map-tiles-from-google-maps might work but using tiles directly would be a violation of terms. – Mike Sep 01 '23 at 13:54

0 Answers0