Unexpected behavior in WebODM iframe

BossInGameBR

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.

18 Replies

BossInGameBR OP

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

BossInGameBR OP

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)

BossInGameBR OP
<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>
BossInGameBR OP

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

👍 1
BossInGameBR OP

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

pierotofy

doesn't seem to account for the iframe

BossInGameBR OP

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

pierotofy

something like this was the approach I was also thinking

BossInGameBR OP

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 Thread

This page mirrors a public discussion from the WebODM Discord. How to request a removal.