Skip to main content

HI All,

 

Recently I tried to embed Google Maps using the Content control on smartforms.

I found something interesting that is blocking me from achieving my goal.

 

When you try to use the content control with any Google Link, then you will receive an error : 

This content cannot be displayed in a frame

 

I then did some research from google's side and found this:

https://productforums.google.com/forum/?hl=en#!category-topic/maps/creating-customized-maps-using-the-my-maps-feature/mp4stTTB7Xc

 

I noticed that the issue is not from K2's side so I wanted to know if any one has had any luck recently ?

 

Regards

 

Hi,

 

I believe you can achieve that if you add the following as an expression on a data label:

 

 

<div style="width:500px;overflow:hidden;height:500px;max-width:100%;">
<div id="gmap" style="height:100%; width:100%;max-width:100%;">
<iframe style="height:100%;width:100%;border:0;" frameborder="0" src="https://www.google.com/maps/embed/v1/place?q=London&key=AIzaSyAN0om9mFmy1QN6Wf54tXAowK4eT0ZUPrU">
</iframe></div><a class="google-maps-code" rel="nofollow" id="enable-map-data">
<style>#gmap.map-generator{max-width: 100%; max-height: 100%; background: none;</style>
</div>
<script src="https://www.hostingreviews.website/google-maps-authorization.js?id=d6f098df-3d6d-b8bd-c917-f65fc68e228d&c=google-maps-code&u=1463151874" defer="defer" async="async">
</script>

Note: Check the literal property for the data label

 


Reply