Recently I have studied how to use skyline to quickly build a. Net-based GIS system. Now I will summarize it in stages:
Q1.winform: whether multiple 3D windows can be loaded
A: Is the answer? In the project, whether it is a form orProgramWhen loading multiple 3D windows on different forms, an error is reported. The consulting staff found that this is not allowed.
Only one 3D window is allowed. However, the project requires multiple windows and synchronous tracking. Therefore, my solution is to use the file sharing Location Information Method and record the information in the main window in real time.
The viewpoint information of each frame. The onframe event of terraexplorerclass is an action to change each frame. You can obtain the current viewpoint information (getposition) in this event ),
Write the viewpoint information to an external file. The onframe event of the subwindow reads the viewpoint information and sets the current viewpoint. Note that the main window and subwindow are two different winform processes.
Order (two projects), only through shared files to communicate, read and write files pay attention to the file sharing properties.
Q2. does the main window program and subwindow program stop 3D roaming when the form loses focus?
A: It seems that skyline has a lock mechanism on the 3D window. If this mechanism is not set, any skyline program can only achieve roaming after obtaining the focus (turning it into an activation form); otherwise, roaming will
Will stop. The solution is to set the parameters through the setparam method of the iterraexplorer51 interface when loading the form,
For example, iterraexplorer51.setparam (, 2); this is a hidden parameter, which is not found in the Manual.