Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Account Setup

Start using XP360 API Beta for free by creating an account at https://app.aerialsphere.com/xp360api/. Check your email for a verification email as prompted, and click the “Activate” link in the email to finish activating your account. Follow the prompts to access your API key.

Image Modified

From this screen you can copy your API key using the copy icon to the right of the key preview, or by clicking on the key string. Click the edit icon for additional settings for this API key. You can also add new API keys as necessary.

XP360 API Basics

Create a new web page, and add a <script> tag pointing to the XP360 API and including your API key, like this:

<script src="https://app.aerialsphere.com/api/map/js?key=INSERT-YOUR-API-KEY-HERE"></script>

Add a <div> to your page, and then another <script> tag in which you call the API constructor:

Code Block
<div id="aerialSphereTestDiv"/>

<script>
  const aerialSphereApi = new AerialSphere('aerialSphereTestDiv');
</script>

The XP360 viewer will be shown in an iframe which will be created inside your div.

Here is a simple example:

Iframe
src//jsfiddle.net/AerialSphere/u74jyd3o/embedded/js,html,result/dark/
width100%
frameborderhide
height225px

Adding Styles

You can add CSS styles to the XP360 viewer iframe by passing a class name to the AerialSphere constructor; the class will be added to the iframe. Here is an example which adds styles to the div to make it fill the parent element, and adds styles to the iframe to fill the div:

Iframe
src//jsfiddle.net/AerialSphere/vmae5gru/embedded/js,html,css,result/dark/
width100%
frameborderhide
height375px

Calling API Functions

Consult the API Reference for a list of the functions you can use. Here is an example which demonstrates adding markers and changing the camera view: Markers and Buttons example.