Project Views


Project Views are records that hold configured Menu Items used to load different data into Navigator's scene.

Bookmark records sit alongside Project Views to snapshot particular configurations of the scene with different enabled Menu Items.

Note that "Slide" is a legacy term for "Bookmark" so you will see it occasionally in the API.

Data models

Below you will find the data models for both Project Views and Bookmarks.

interface IProjectView {
    // ID of the project view.
    // This is a unique identifier you can pick yourself to create new records.
    // We usually use a short alphanumeric string. However you can use simple easier to remember strings.
    ID: string;
    // Human readable name of the Project View.
    Name: string;
    // Human readable description of the Project View.
    Description?: string;
    // (20) Indicates the type of Project View this is.
    // This is used to determine the expected settings and application. Eg: 3D vs 2D Navigator.
    Type?: "WEB_3D_NAVIGATOR" | string;
    // ID of the user that created the Project View.
    "CreatedByUser.ID"?: string;
    // Created/updated date/time in ISO 8601 UTC.
    Created?: string;
    Updated?: string;
    // Version of the UI that created this project view.
    // Set to -1 if unknown.
    CreatedByUIVersion?: string;
    // Settings for the project view.
    Settings?: any; // Depends on the Type. Documented further down.
}

interface IBookmark {
    // ID of the Bookmark record.
    ID?: string;
    // Human readable title of the Bookmark.
    Title?: string;
    // Human readable description of the Bookmark.
    Note?: string;
    // ID of the Client File used for the Bookmark thumbnail.
    // Must be set. Use an empty string if no thumbnail is desired.
    "Screenshot.ClientFile.ID"?: string;
    // ID of the associated Project View.
    "UI.View.ID"?: string;
    // ID of the user who created the Bookmark.
    "Created.ByUser.ID"?: string;
    // Bookmark grouping ID.
    "UI.SlideGroup.ID"?: number;
    // Display order related to sibling Bookmarks.
    DisplayOrder?: number;
    // Bookmark camera position.
    Camera?: any; // Depends on the type. Documented further down.
    // Settings for the Bookmark.
    Settings?: Settings; // Depends on the type. Documented further down.
    // Created/updated date/time in ISO 8601 UTC.
    Created: string;
    Updated?: string;
}

Type 3D Navigator

This is our typical Project View you would experience using Navigator. Below are the details for the settings and camera position.

interface IProjectView {
    ...
    Settings?: {
        // If true, anonymous users won't be able to access the view.
        IsLoginRequired?: boolean;
        // If true, users must have the permission "UIVIEW_<view_id>" to access the view.
        IsRestricted?: boolean;

        // CSS color string to use when selecting Entities.
        // Default is yellow.
        selectionColor?: string;
        // CSS color string to use when highlighting Entities.
        // This is typically when you hover over rows such as the Scene Tree Entities.
        // Default is a light blue.
        highlightColor?: string;

        // Available Menu Items for users to toggle, or for Bookmarks to enable.
        menuItem?: any[]; // Will be documented separately as it's a larger topic.

        // Available basemaps for users to toggle, or for Bookmarks to enable.
        // When not specified, we will provide a default list.
        imageries?: {
            // ID of the Tileset to load.
            // This can either be an imported geotiff, a setup external source, or a default ID for the defaults we provide.
            tilesetId: string;
            // If you manage multiple Nextspace accounts, you can share imports basemaps by specifying where to load one from.
            // Keep empty, or set to your account's (organization) ID.
            accountId?: string;
        }[];
        // Available terrains for users to toggle, or for Bookmarks to enable.
        // When not specified, we will provide a default list.
        terrains?: {
            // ID of the Tileset to load.
            // This can either be an imported geotiff, a setup external source, or a default ID for the defaults we provide.
            tilesetId: string;
            // If you manage multiple Nextspace accounts, you can share imports terrrains by specifying where to load one from.
            // Keep empty, or set to your account's (organization) ID.
            accountId?: string;
        }[];

        // Branding settings specific to this Project View.
        // These compliment the account-level branding settings.
        branding?: {
            // Client File ID for the Project View's banner.
            // In Navigator this is found within the Navigator's dashboard.
            bannerFileId?: string;
        }

        // Presentation settings.
        // These are referenced when a Project View is 'presented'.
        present?: {
            // Time in milliseconds to hold bookmarks before moving to the next bookmark.
            // This is a default time and can be overridden by the bookmark's duration.
            bookmarkDuration?: number;
        }

        // Entity selection settings.
        // These can be specified to have alternative panels for selected Entities.
        selection?: {
            // Specify what should occur by default when an Entity is selected.
            // When not set, the default of action of INFO_VIEW (typical selected Entity panel) is used.
            defaultAction: ISelectionAction; // See below for the details.

            // Array of Entity Type mappings to specify what should occur when an Entity of that type is selected.
            // When an action is not found, the default one is referenced.
            entityTypeMapping?: ISelectionAction[];
        }

        // Plugin related settings.
        // Plugins are custom code packages that can be loaded into Navigator.
        plugins?: {
            // Enabled Plugin IDs.
            enabledIds: string[];
        }[];
    }
}

/**
 * These are the params related to the "selection" settings found in the Project View.
 */
interface ISelectionAction {
    // Null = any Entity Type.
    // This is the Entity Type ID to match against.
    entityTypeId?: string;
    // This is the action to perform on user-click.
    // A NONE action will stop on-hover pointer cursors and a panel from appearing.
    action: "INFO_VIEW" | "CUSTOM_FORM" | "PLUGIN" | "NONE";
    // These are the params related to the action.
    actionParams?: undefined | IActionInfoView | IActionCustomForm | IActionPlugin;
    // (Optional) alternative schema ID.
    // This loads a different Data Schema when the Entity details are presented.
    schemaId?: string;
}

/**
 * These are the params related to the "info-view" action.
 * This is the Nextspace default entity details panel.
 */
interface IActionInfoView {
    // Optional parameter to specify what tabs within the panel should be enabled.
    // By default, all tabs are available.
    // Null or empty means all tabs should be available.
    tabs?: ("SUMMARY" | "ATTRIBUTES" | "RELATIONSHIPS" | "FILES" | "MEDIA" | "COMMENTS" | "GRAPHICS" | "LODS")[];

    // If the version is not >=1 then code will consider "ATTRIBUTES" tab "available".
    // This is because it is a new tab added in version 1.
    dataVersion?: number;
}

/**
 * These are the params related to the "custom-form" action.
 */
export interface IActionCustomForm {
    // This is the ID of the Custom Form to display.
    formId: number;
}

/**
 * These are the params related to the "plugin" action.
 * This is custom code that can be executed in place of the form's content.
 */
export interface IActionPlugin {
    pluginId: string;
}

interface IBookmark {
    ...
    Camera?: {
        // Meters relative to ground.
        altitude: number;
        // In degrees.
        latitude: number;
        longitude: number;
        heading: number;
        pitch: number;
        roll: number;
        // If frustum is different between two bookmarks, transition should be instant.
        // 0 = Perspective, 1 = Orthographic.
        // Default is 0.
        cameraFrustum?: 0 | 1;
    };
    Settings?: {
        // Default is WEB_3D. This will render the typical CesiumJS experience.
        // IFRAME will render an embedded iframe in the bookmark.
        contentType?: "WEB_3D" | "IFRAME";

        // This is the URL to the iframe content.
        // This is only used when contentType = IFRAME.
        iframeUrl?: string;

        // Below are settings related to the WEB_3D content type.

        // (Optional) array of Menu Items to enabled.
        // When a Menu Item is enabled, child items are also enabled.
        menuItemIds?: string[];

        // (Optional) ISO 8601 datetime string to load the scene at a specific time.
        // String itself includes timezone information. Navigator will create a UTC string when saving.
        dateTime?: string;

        // (Optional) timeline settings.
        timeline?: {
            // ISO 8601 date time string for the start of the timeline.
            start: string;
            // ISO 8601 date time string for the end of the timeline.
            end: string;
            // Indicates that time should move between start and end at the provided speed.
            playing: boolean;
            // 1 = 1 second per second.
            speed: number;
        }

        // (Optional) array of enabled basemaps. An empty array is allowed to disable all basemaps.
        imagery?: {
            // ID of the Tileset to load.
            // This can either be an imported geotiff, a setup external source, or a default ID for the defaults we provide.
            tilesetId: string;
            // If you manage multiple Nextspace accounts, you can share imports basemaps by specifying where to load one from.
            // Keep empty, or set to your account's (organization) ID.
            accountId?: string;

            // 0 - 1, 1 = 100% opacity.
            // Default = 1.
            alpha?: number;
            // Default = 1.
            brightness?: number;
            // Default = 1.
            saturation?: number;
            // Default = 1.
            contrast?: number;
            // Default = 1.
            gamma?: number;
            // Default = 0.
            hue?: number;
        }[];

        // (Optional) enabled terrain.
        // When unspecified, a default will be loaded (usually flat terrain).
        // Only one terrain is enabled at a time.
        terrain?: {
            // ID of the Tileset to load.
            // This can either be an imported geotiff, a setup external source, or a default ID for the defaults we provide.
            tilesetId: string;
            // If you manage multiple Nextspace accounts, you can share imports terrrains by specifying where to load one from.
            // Keep empty, or set to your account's (organization) ID.
            accountId?: string;
        };
        // (Optional) if true, the terrain will be displayed as a wireframe.
        // This is mostly a debug feature.
        terrainWireframe?: boolean;

        // (Optional) CSS color to apply to the globe underneath the basemaps.
        // Default is a dark blue.
        globeColor?: string;
        // (Optional) opacity of the globe color.
        // 0 = 0%, 1 = 100%. Default is 100%.
        // This lets you see underground data in a more natural way, hover stops position picking from working.
        globeAlpha?: number;
        // (Optional) if true, the globe will be hidden. Default is false.
        // This is typically used for Google Photogrammetry data to avoid it clashing with the globe.
        globeHidden?: boolean;

        // (Optional) if ground occlusion should be enabled.
        // Ground occlusion stops Entities under the terrain from being visible.
        groundOcclusion?: boolean;

        // (Optional) shadow settings.
        shadows?: {
            // If true, shadows are enabled.
            enabled: boolean;
            // If true, shadow edges are softened.
            soften: boolean;
            // Pixel size determines shadow quality.
            // This typically increments in sets of 1024.
            pixelSize: number;
            // Darkness of shadows.
            // Default is "0.3".
            darkness: number;
        }
        // (Optional) ambient occlusion settings.
        ambientOcclusion?: {
            enabled: boolean;
            intensity: number;
            lengthCap: number;
            bias: number;
            blurStepSize: number;
            stepSize: number;
        }
        // (Optional) lighting settings.
        lighting?: {
            // Colour of the sun.
            color: string;
            // Intensity of the sun.
            intensity: number;
        }
        // (Optional) This enables lighting that makes terrain elevation apparent.
        hillShades?: boolean;
        // (Optional) quality settings.
        quality?: {
            // If true, "smooth rendering" is enabled.
            fxaa: boolean;
        }

        // (Optional) array live Entities that will ping for changes occasionally.
        // It's recommended to keep this list small (around 30 at most).
        liveEntityIds?: string[];

        // (Optional) array of Entity 'states'.
        states?: {
            // Entity ID to tie the state to.
            entityId: string;
            // This is considered a 'precise' value when set and therefor values will override the unspecified ones.
            // Eg: If Entity ID + Menu Item ID is set to hidden, and another isn't, the Entity will be hidden.
            menuItemId?: string;
            // Value between 0 and 1. 1 = 100% opacity.
            opacity?: number;
            // If the Entity should be hidden.
            hidden?: boolean;
            // If the Entity should have a selection colour applied.
            // This will also make the selection panel appear.
            selected?: boolean;
            // If the Entity is isolated.
            // When at least one Entity is isolated, only isolated Entities are visible.
            isolated?: boolean;
            // If the Entity is labelled.
            // This draws a label on the Entity based on its name and "additional labels" settings in the Entity Type.
            labelled?: boolean;
            // If the Entity is highlighted.
            // The selection colour takes priority over this.
            highlighted?: boolean;
        }[];
    };
}

Project View requests

Below are the basic requests for managing Project View records.

Get Project Views

Response
interface IResponse {
    Items: IProjectView[];
}
Javascript example

Get Project View by ID

Response
// Response is the Project View record directly.
// See the data model above for details.
Javascript example

Create Project View

Request body
// Body is the Project View record directly.
// Enter the new ID yourself.
// We usually do a short alphanumeric string. However you can use simple easier to remember strings.

Update Project View

Request body
// Body is the Project View record directly.

Delete Project View by ID

Javascript example

Bookmark requests

Below are the basic requests for managing Bookmark records.

Note that "Slide" is a legacy term for "Bookmark".

Get Project View Bookmarks

Response
interface IResponse {
    Items: IBookmark[];
}
Javascript example

Get Bookmark by ID

Response
// Response is the Bookmark record directly.
// See the data model above for details.
Javascript example

Create / Update Bookmark

Request body
// Body is the Bookmark record directly.
// Exclude the ID when creating a new Bookmark record.

Delete Bookmark by ID

Javascript example

Update Bookmark display order

Request body
interface IRequest {
    // The starting display order value for the first Bookmark.
    // This is typically 0.
    "DisplayOrder.Start": number;
    // Bookmark IDs in their new order.
    "UISlide.ID": string[];
}

Bookmark groups

You can optionally organize your Bookmarks into folders by using Bookmark Groups. Groups will appear above ungrouped Bookmarks in panels.

interface IBookmarkGroup {
    // Unique ID of the group.
    ID?: number;
    // Name of the group.
    Name: string;
    // Display order of the group.
    DisplayOrder: number;
}

Get Bookmark Groups

Response
interface IResponse {
    Items: IBookmarkGroup[];
}
Javascript example

Create / Update Bookmark Group

Request body
// Body is the Bookmark Group record directly.
// Exclude the ID when creating a new Bookmark Group record.
Response
// Response is the Bookmark Group record directly.
// See the data model above for details.
Javascript example

Delete Bookmark Group

Javascript example

Update Bookmark Groups display order

Request body
interface IRequest {
    // Bookmark Group IDs in their new order.
    "UI.SlideGroup.ID": number[];
}