I am developing an application that uses WebODM's iframe feature to integrate a generated map into the project, however the iframe part works correctly for two-dimensional resources (orthophoto, dsm, dtm, etc.), however when I load the 3D it loads the project name and branding.
Unexpected behavior in WebODM iframe
18 Replies
I believe it should only load the Potree screen, as in the two-dimensional model iframe. Even when I click to go back to 2D it ends up "contaminating" the 2D page also causing the project name and branding to appear
Does your iframe URL look like:
The generated iframe template is
http://{IP:port or domain}/public/task/{taskid}/iframe/map/?t=orthophoto
Even in my HTML code I implemented it in the same way, using the iframe automatically generated in WebODM (adapting only the ip:port or the domain that I will use, as well as the uuid of the task)
<div class="container">
<div class="iframe-wrapper">
<iframe
scrolling="no"
title="WebODM"
src="http://{IP:port or domain}/public/task/{taskid}/iframe/map/?t=orthophoto">
</iframe>
</div>
</div>Aaaa, I now understand what you meant. When I click on the 3D button in the 2D tab of my iframe it does not redirect to the URL http://{IP:port or domain}/public/task/{taskid}/iframe/3d , but to http://{IP:port or domain}/public/task/{taskid}/3d . I believe the correction in WebODM is there
Even when manually accessing http://{IP:port or domain}/public/task/{taskid}/iframe/3d through the browser, the problem is now reversed. Therefore, when I click the 2D button, it shows the 2D map with the other elements incorrectly (project name and branding). Therefore, the 2D button in the 3D tab of the WebODM iframe also needs to be changed to redirect to http://{IP:port or domain}/public/task/{taskid}/iframe/map
I see it too; there seems to be an issue somewhere around https://github.com/WebODM/WebODM/blob/master/app/static/app/js/components/SwitchModeButton.jsx#L34
doesn't seem to account for the iframe
I'm looking at the file; I believe a viable solution for same-origin execution would be code in this style. I'm very rusty, haha
I think it's feasible, it just needs testing 😅
something like this was the approach I was also thinking
Fixed with https://github.com/WebODM/WebODM/pull/1903
Thanks for the quick fix! I'll do a git clone to work on the current state of the program while the next version is being developed 🤝
Need more help?
This discussion happened in the WebODM community Discord. Join and ask your own question.
Join View Original ThreadThis page mirrors a public discussion from the WebODM Discord. How to request a removal.