This is documentation of a bèta release.
For documentation on the current version, please check Knowledge Base.
For documentation on the current version, please check Knowledge Base.
This is an old revision of the document!
Example loginOptions 3D Mapping Cloud
Code
<script src="https://cdn.3dmapping.cloud/19.6.0/javascript/orbitgt_3dm_sdk.js"></script> <div id="m3dviewer"/> <script type="text/javascript"> var viewer; var AMap = orbitgt.mapping3d.sdk.viewer.AMap; var Constants = orbitgt.mapping3d.sdk.viewer.Constants; var SDKViewer = orbitgt.mapping3d.sdk.viewer.SDKViewer; console.log(Constants); /** * Called when the viewer component is ready for interaction. */ function handleReady() { // Listen to the state-changed signal viewer.onAppStateChanged.add(handleAppStateChanged); } /** * Called when the page is full loaded. */ function handleDOMReady() { // Create viewer startup options var loginOptions = new AMap(); loginOptions.set(Constants.LOGIN_MODE, Constants.LOGINMODE_GUEST_CLOUD); loginOptions.set(Constants.LOGIN_PUBLICATION_PUBLIC_ID, "CldMRasjNYPbnBQcyo3A"); var options = new AMap(); options.set(Constants.STARTUP_AUTO_LOGIN,loginOptions); // Create viewer var appElement = document.getElementById("m3dviewer"); viewer = new SDKViewer("example application",appElement,options); viewer.setSize(1080,500); viewer.isReady.then(handleReady); } // Wait for page to load document.addEventListener("DOMContentLoaded", handleDOMReady); </script>
Viewer
Last modified:: 2019/06/14 05:52