Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Map Iframe by HTML to power bi #21

Closed
Brachalevin opened this issue Dec 1, 2020 · 4 comments
Closed

Add Map Iframe by HTML to power bi #21

Brachalevin opened this issue Dec 1, 2020 · 4 comments
Labels
question Further information is requested visuals SDK limitation Something that can't be resolved due to limitations imposed by the Power BI Visuals API/SDK

Comments

@Brachalevin
Copy link

Hi,
I need to add to power bi Govmap iframe element with HTML
This is my iframe :
HTML = "<iframe id='ifrMap' frameborder= '0' scrolling= 'no' marginheight= '0' marginwidth= '0' width='350px' height='350px'src= 'https://www.govmap.gov.il/map.html?bb=1&zb=1&in=1&c=204000,595000&z=0' > </iframe>"
I have X,Y for every row in my data.
Do html-content know iframe?
if yes, how can i do that?
thanks,
bracha.

@dm-p
Copy link
Owner

dm-p commented Dec 1, 2020

Hi there, and thanks for your question. <iframe> elements don't always work, but this is a limitation of custom visuals in Power BI. I have created #22 to explain this in a bit more detail and hopefully this clarifies things for you.

The short answer is: Desktop explicitly blocks <iframe> elements in any custom visual, so you need to test in the Service. It might work in the Service, depending on what the remote site allows.

Your case is one of the fortunate ones - when I publish to the Power BI Service, it will display:

image

This is not a guarantee that it will always work - govmap.il may choose to revoke the permission for origin-less <iframe> elements at any time (which is how custom visuals are rendered in Power BI).

@dm-p dm-p closed this as completed Dec 1, 2020
@dm-p dm-p added question Further information is requested visuals SDK limitation Something that can't be resolved due to limitations imposed by the Power BI Visuals API/SDK labels Dec 1, 2020
@Brachalevin
Copy link
Author

Brachalevin commented Dec 2, 2020 via email

@dm-p
Copy link
Owner

dm-p commented Dec 5, 2020

Apologies for the delay - I'm currently on vacation and am not regularly looking at my personal projects. Unfortunately I don't know enough about your data model or use case to answer fully and would need more detail. One thing I would suggest is that <iframe/> tags should be self-closing, that is, don't write them like:

<iframe id = 'ifrMap' ...> </iframe>

but rather:

<iframe id = 'ifrMap' ... />

e.g. for the test I did in my above comment, the column expression was as follows:

<iframe id='ifrMap' frameborder= '0' scrolling= 'no' marginheight= '0' marginwidth= '0' width='350px' height='350px'src= 'https://www.govmap.gov.il/map.html?bb=1&zb=1&in=1&c=204000,595000&z=0' />

Regarding filtering, if your data going into the <iframe/> URI should filter the map (depending on however govmap implement their embed) then it likely will. However as I don't support govmap, or have any knowledge of this service or your data model, then that would be something you'd need to check with them. If you wish for me to investigate then my services can be engaged professionally, but it's a little outside the scope of supporting this particular visual.

To round out the subject of filtering, this visual cannot filter other visuals, much like the built-in R or Python visuals can't either.

@Brachalevin
Copy link
Author

Brachalevin commented Dec 16, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested visuals SDK limitation Something that can't be resolved due to limitations imposed by the Power BI Visuals API/SDK
Projects
None yet
Development

No branches or pull requests

2 participants