XYZ Maps Documentation
    Preparing search index...

    Interface LocalProviderOptions

    Options to configure the Provider.

    interface LocalProviderOptions {
        attribution?: string | DataSourceAttribution | DataSourceAttribution[];
        editable?: boolean;
        enforceRandomFeatureId?: boolean;
        hooks?: {
            "Coordinates.update"?: CoordinatesUpdateHook | CoordinatesUpdateHook[];
            "Feature.remove"?: FeatureRemoveHook | FeatureRemoveHook[];
            "Navlink.disconnect"?: NavlinkDisconnectHook | NavlinkDisconnectHook[];
            "Navlink.split"?: NavlinkSplitHook | NavlinkSplitHook[];
        };
        id?: string;
        margin?: number;
        name?: string;
    }

    Hierarchy

    • EditableFeatureProviderOptions
      • LocalProviderOptions
    Index
    attribution?: string | DataSourceAttribution | DataSourceAttribution[]

    Attribution information for data sources used by this provider.

    Attributions are automatically displayed or hidden depending on whether the corresponding data is currently active or visible on the map — e.g., based on zoom level, layer visibility, or usage. This ensures that only active data providers are credited, as required by licensing.

    Can be a simple string (displayed as static text), or an array of structured attribution entries that support clickable labels and optional tooltips.

    // Simple attribution string
    attribution: "© Data Provider"
    // Multiple detailed attributions
    attribution: [
    {
    label: "© Elevation Provider",
    url: "https://elevation.example.com",
    title: "Elevation data source"
    },
    {
    label: "Imagery © HERE Maps",
    url: "https://www.here.com",
    title: "Satellite imagery by HERE"
    }
    ]
    editable?: boolean

    Allow or prevent editing by the Editor module.

    false
    
    enforceRandomFeatureId?: boolean

    Enforce random ids for newly created features. If "enforceRandomFeatureId" is set to true, the ids of features created by editor.addFeature are ignored and randomly created. If "enforceRandomFeatureId" is set to false, ids of features created by editor.addFeature can be set. Random ids are only generated if none have been set.

    true
    
    hooks?: {
        "Coordinates.update"?: CoordinatesUpdateHook | CoordinatesUpdateHook[];
        "Feature.remove"?: FeatureRemoveHook | FeatureRemoveHook[];
        "Navlink.disconnect"?: NavlinkDisconnectHook | NavlinkDisconnectHook[];
        "Navlink.split"?: NavlinkSplitHook | NavlinkSplitHook[];
    }

    Add hook functions that will be called during the execution of the corresponding "editing operation". The "hooks" option is a map with the "editing operation" as its key and the corresponding Hook or Array of Hook function(s) as its value.

    Available editing operations are 'Navlink.disconnect', 'Navlink.split', 'Feature.remove', 'Coordinates.remove'.

    Type Declaration

    • OptionalCoordinates.update?: CoordinatesUpdateHook | CoordinatesUpdateHook[]

      The CoordinatesUpdateHook(s) will be called whenever the coordinates of a feature are added, updated or removed ('Coordinates.update' operation).

    • OptionalFeature.remove?: FeatureRemoveHook | FeatureRemoveHook[]

      The FeatureRemoveHook(s) will be called when a feature is being removed ('Feature.remove' operation).

    • OptionalNavlink.disconnect?: NavlinkDisconnectHook | NavlinkDisconnectHook[]

      The NavlinkDisconnectHook(s) will be called whenever a Navlink is disconnected from an intersection ('Navlink.disconnect' operation).

    • OptionalNavlink.split?: NavlinkSplitHook | NavlinkSplitHook[]

      The NavlinkSplitHook(s) will be called whenever a Navlink is devided into two new Navlinks. ('Navlink.split' operation).

    id?: string

    optional id to identify the provider.

    margin?: number

    Tile margin of the provider.

    name?: string

    Name of the provider.