To initialize and use Altus in your web page you'll need these files:
altus.css
../../../../../releases_subdomain/latest/Web/AltusMappingEngine/documentation/altus.js
AltusWeb.html.mem
These files must be in the same location. It would also be wise to enable gzip compression support on your web server to ensure the javascript code is served to the browser in compressed form.
Included in the sdk is:
This is an optional library of helper functions that simplify use of the Altus mapping engine. Many of the tutorials in the documentaiton here rely on helper function in this file.
This should be between the <head>
and </head>
tags of your page.
<link href="altus.css" rel="stylesheet">
Somewhere in the body of your page, add a <div>
element with the id set to AltusDiv:
<div style="position:relative; width:100%; height:75vh; overflow:hidden;" id="AltusDiv"></div>
<script type="text/javascript" src="../../../../../releases_subdomain/latest/Web/AltusMappingEngine/documentation/altus.js"></script>
Create an instance of the Altus mapping engine passing it the id of the <div>
element you created earlier.
<script type='text/javascript'>
var AltusUnified = new Altus(document.getElementById("AltusDiv"));
</script>
Add a javascript function called onAltusEngineReady()
. This function will be called when Altus has completed initializing.
<script type='text/javascript'>
//Called by the mapping engine after it has initialized
function onAltusEngineReady() {
console.log("onAltusEngineReady called");
AltusUnified.scene.setLicenseKey('YOUR-LICENSE-KEY-HERE');
};
</script>
AltusMappingEngine Web v2.0.ut.2153.g60764257e master
COPYRIGHT (C) 2017, BA3, LLC ALL RIGHTS RESERVED