Initializing Altus

To initialize and use Altus in your web page you'll need these files:

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.

Include the Altus Stylesheet File

This should be between the <head> and </head> tags of your page.

    <link href="altus.css" rel="stylesheet">

Add a <div> Element

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>

Include the Altus Javascript File

    <script type="text/javascript" src="../../../../../releases_subdomain/latest/Web/AltusMappingEngine/documentation/altus.js"></script>

Initialize Altus

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"));

onAltusEngineReady Event

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");

See Demo

AltusMappingEngine Web v2.0.ut.2153.g60764257e master