Skip to content

workspace sdk map extensions

Andre Lafleur edited this page Mar 21, 2026 · 4 revisions

Extending maps

The Workspace SDK provides components for extending Security Center maps with custom objects, layers, and visualizations. Map extensions integrate with both geo-referenced and non-geo-referenced maps.

Map extension components

Note

The map components documented on this page do not require an SDK certificate. The MapDesignerTool and MapDesignerWidget components listed on the components page do require certificates.

Map functionality is extended through several component types:

Component Purpose
MapObjectProvider Supplies custom objects to display on maps
MapObjectViewBuilder Creates visual representations of map objects
MapLayerBuilder Adds custom overlay layers to maps
MapSearcher Provides search results for map locations
MapImporter Imports external map data

MapObjectProvider

A MapObjectProvider supplies custom objects for display on maps. Objects are queried based on the current map context.

Creating a provider

Inherit from MapObjectProvider and implement the Query method:

public sealed class VehicleProvider : MapObjectProvider
{
    public override string Name => "Vehicle Provider";
    public override Guid UniqueId => new Guid("...");

    public override IList<MapObject> Query(MapObjectProviderContext context)
    {
        var map = Workspace.Sdk.GetEntity(context.MapId) as Map;
        if (map?.IsGeoReferenced != true)
            return null;

        return GetVehicleObjects();
    }
}

MapObjectProviderContext

The context provides information about the map being queried:

Property Description
MapId The map entity GUID

Registering the provider

public class SampleModule : Module
{
    private VehicleProvider m_provider;

    public override void Load()
    {
        m_provider = new VehicleProvider();
        m_provider.Initialize(Workspace);
        Workspace.Components.Register(m_provider);
    }
}

MapLayerBuilder

A MapLayerBuilder creates custom overlay layers for maps, such as heat maps or data visualizations.

Creating a layer builder

Inherit from MapLayerBuilder:

public sealed class HeatMapLayerBuilder : MapLayerBuilder
{
    public override string Name => "Heat Map Layer";
    public override Guid UniqueId => new Guid("...");

    public override bool IsSupported(MapContext context)
    {
        var map = Workspace.Sdk.GetEntity(context.MapId) as Map;
        return map?.IsGeoReferenced == true;
    }

    public override IList<MapLayer> CreateLayers(MapContext context)
    {
        return new List<MapLayer> { new MyHeatMapLayer(Workspace) };
    }
}

IsSupported method

Override IsSupported to control when the layer is available. Check map properties to determine compatibility:

public override bool IsSupported(MapContext context)
{
    var map = Workspace.Sdk.GetEntity(context.MapId) as Map;
    return map != null && map.IsGeoReferenced;
}

MapContext

The context provides map information:

Property Description
MapId The map entity GUID

Combining providers and layers

Map extensions often combine multiple components. A provider supplies data while a layer visualizes it:

public class SampleModule : Module
{
    private VehicleProvider m_provider;
    private VehicleHeatMapBuilder m_layerBuilder;

    public override void Load()
    {
        // Register the data provider
        m_provider = new VehicleProvider();
        m_provider.Initialize(Workspace);
        Workspace.Components.Register(m_provider);

        // Register the layer builder with provider reference
        m_layerBuilder = new VehicleHeatMapBuilder();
        m_layerBuilder.Initialize(Workspace, m_provider);
        Workspace.Components.Register(m_layerBuilder);
    }

    public override void Unload()
    {
        if (m_provider != null)
        {
            Workspace.Components.Unregister(m_provider);
            m_provider.Dispose();
            m_provider = null;
        }

        if (m_layerBuilder != null)
        {
            Workspace.Components.Unregister(m_layerBuilder);
            m_layerBuilder = null;
        }
    }
}

Custom map objects

Create custom map objects by inheriting from MapObject. The base class provides Latitude and Longitude properties that you can override:

public class VehicleMapObject : MapObject
{
    public string VehicleId { get; set; }

    // Latitude and Longitude are inherited from MapObject
    // Override them if you need custom behavior
}

Animating map objects

Update object positions dynamically to create animations:

public void UpdatePosition(GeoCoordinate newPosition)
{
    m_vehicle.Latitude = newPosition.Latitude;
    m_vehicle.Longitude = newPosition.Longitude;
    OnPositionChanged?.Invoke(this, newPosition);
}

MapObjectViewBuilder

Creates visual representations for custom map objects. Register view builders to control how objects appear on maps.

MapSearcher

Implements map search functionality. When users search on maps, your searcher can return matching locations.

Creating a searcher

public class LocationSearcher : MapSearcher
{
    public override string Name => "Location Searcher";
    public override Guid UniqueId => new Guid("...");

    public override IList<MapSearcherResult> Search(MapSearcherContext context)
    {
        // context.Text contains the search query
        // context.MapId is the current map
        // context.ViewArea is the visible map bounds
        return FindMatchingLocations(context.Text);
    }
}

MapImporter

Imports external map data into Security Center. Implement for integrations with external mapping systems.

Geo-referenced maps

Many map extensions only support geo-referenced maps. Check the IsGeoReferenced property:

var map = Workspace.Sdk.GetEntity(mapId) as Map;
if (map?.IsGeoReferenced == true)
{
    // Map supports geographic coordinates
}

For related examples, see the MapControl sample in ControlsSample and the MapObjectsSample on GitHub.

Security Center SDK

  • Security Center SDK Developer Guide Overview of the SDK framework and how to build integrations with Security Center.

    • Platform SDK

      • Overview Introduction to the Platform SDK and core concepts.
      • Connecting to Security Center Step-by-step guide for connecting and authenticating with the SDK.
      • SDK Certificates Details certificates, licensing, and connection validation.
      • Referencing SDK Assemblies Best practices for referencing assemblies and resolving them at runtime.
      • SDK Compatibility Guide Understanding backward compatibility and versioning in the SDK.
      • Entity Guide Explains the core entity model, inheritance, and how to work with entities.
      • Entity Cache Guide Describes the engine's local entity cache and synchronization.
      • Transactions Covers batching operations for performance and consistency.
      • Events Subscribing to real-time system events.
      • Actions Sending actions to Security Center.
      • Security Desk Displaying content on monitors, reading tiles, sending tasks, and messaging operators.
      • Custom Events Defining, raising, and subscribing to custom events.
      • ReportManager Querying entities and activity data from Security Center.
      • ReportManager Query Reference Complete reference of query types, parameters, and response formats.
      • Privileges Checking, querying, and setting user privileges.
      • Partitions Entity organization and access control through partitions.
      • Logging How to configure logging, diagnostics, and debug methods.
    • Plugin SDK

    • Workspace SDK

    • Macro SDK

      • Overview How macros work, creating and configuring macro entities, automation, and monitoring.
      • Developer Guide Developing macro code with the UserMacro class and Security Center SDK.

Web SDK Developer Guide

  • Getting Started Setup, authentication, and basic configuration for the Web SDK.
  • Referencing Entities Entity discovery, search capabilities, and parameter formats.
  • Entity Operations CRUD operations, multi-value fields, and method execution.
  • About access control in the Web SDK Concepts, relationships, and common access-control operations.
  • About video in the Web SDK Concepts, relationships, configuration, and common video operations.
  • Users and user groups Creating users, managing group membership, and assigning privileges.
  • Partitions Managing partitions, entity membership, and user access control.
  • Custom Fields Creating, reading, writing, and filtering custom entity fields.
  • Custom Card Formats Managing custom credential card format definitions.
  • Actions Control operations for doors, cameras, macros, and notifications.
  • Events and Alarms Real-time event monitoring, alarm monitoring, and custom events.
  • Incidents Incident management, creation, and attachment handling.
  • Reports Activity reports, entity queries, and historical data retrieval.
  • Tasks Listing and executing saved report tasks.
  • Macros Monitoring currently running macros.
  • Custom Entity Types Listing, retrieving, and deleting custom entity type descriptors.
  • System Endpoints License usage, web tokens, and exception handling.
  • Performance Guide Optimization tips and best practices for efficient API usage.
  • Reference Entity GUIDs, EntityType enumeration, and EventType enumeration.
  • Under the Hood Technical architecture, query reflection, and SDK internals.
  • Troubleshooting Common error resolution and debugging techniques.

Media Gateway Developer Guide


Web Player Developer Guide

  • Developer Guide Complete guide to integrating GWP for live and playback video streaming.
  • API Reference Full API documentation with interfaces, methods, properties, and events.
  • Sample Application Comprehensive demo showcasing all GWP features with timeline and PTZ controls.
  • Multiplexing Sample Multi-camera grid demo using a shared WebSocket connection.

Clone this wiki locally