Skyline-based web development (6.x)

Multi-window comparison

One page loads multiple TerraExplorer3DWindow and SGWorld, etc. Only the first one can be used (even if using iframe)

So I decided to open two new pages to achieve multi-window comparison, and then I used window.open to open two "new pages" in the "main page", but these two new pages were actually on the main page (using window. open page) has produced an effect, and it feels the same as loading multiple TerraExplorer3DWindow and SGWorld on a previous page! ! !

Then after testing, it was found that the 3D map was loaded normally when the new page of the main page was closed. It can be seen that the main page and the new page are related when using window.open. I tried a lot of methods at first but couldn't break the relationship. Finally, I decided to open one more main page when opening the new page, and then close the main page. stupid way.

When the window is currently closed using window.close, it is not closed. I searched and found this line of code before closing.window.opener=null

The opener property is a read-write property that returns a reference to the Window object that created the window.
The opener property is very useful, a created window can reference properties and functions defined by the window that created it.

The method to disconnect the main page and the new page has been found! ! !

Summary:
Use window.open to open two windows, and then set window.opener to null, so that you can open 3D scenes in different windows.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325129527&siteId=291194637