XYZ Maps Documentation
    Preparing search index...

    Interface EditorOptions

    Options to configure the map editor (Editor).

    interface EditorOptions {
        address?: { autoResolveRoutingPoint?: boolean };
        autoConnect?: boolean;
        coordinatePrecision?: number;
        disconnectShapeDistance?: number;
        editRestrictions?: (
            feature: Feature,
            operation: EditOperation,
            context?: EditRestrictionContext,
        ) => boolean;
        featureSelectionByDefault?: boolean;
        geoFence?: number | false;
        intersectionScale?: number;
        keepFeatureSelection?: string | boolean;
        layers?: TileLayer[];
        maxRoutingPointDistance?: number;
        place?: { autoResolveRoutingPoint?: boolean };
        routingPointPrecision?: number;
        services?: {
            reverseGeocoder?: {
                getISOCC?(
                    longitude: number,
                    latitude: number,
                    callback: (isoCC: string) => void,
                ): string;
            };
        };
        snapTolerance?: number;
    }
    Index
    address?: { autoResolveRoutingPoint?: boolean }

    Configure Address feature behavior.

    Type Declaration

    • OptionalautoResolveRoutingPoint?: boolean

      Automatically resolve to the nearest Navlink when no valid routing point is available.

      true
      
    autoConnect?: boolean

    Enable or disable automatic connection of Navlink shapes to nearby Navlinks on drag-drop. When set to false, shapes will not automatically connect after being dragged, allowing manual connection handling via Navlink.getConnectionCandidates. Can be overridden per feature using Navlink.behavior.

    true
    
    coordinatePrecision?: number

    The number of decimal places used when feature geometry coordinates are written.

    9
    
    disconnectShapeDistance?: number

    The distance in meters between the two shape-points when two Navlink Features get disconnected.

    3
    
    editRestrictions?: (
        feature: Feature,
        operation: EditOperation,
        context?: EditRestrictionContext,
    ) => boolean

    Callback that is called before certain edit operations are executed. This callback can be used to allow or restrict specific edit operations based on the return value.

    Type Declaration

      • (
            feature: Feature,
            operation: EditOperation,
            context?: EditRestrictionContext,
        ): boolean
      • Parameters

        • feature: Feature

          The map feature to be edited.

        • operation: EditOperation

          The requested edit operation: 1 - GEOMETRY CHANGE 2 - REMOVE

        • Optionalcontext: EditRestrictionContext

          Optional context of the affected edit target. For coordinate-level restrictions it can contain coordinateIndex, lineStringIndex, and polygonIndex. It is undefined when no concrete coordinate is affected.

        Returns boolean

        • Return false to allow the operation(s) and execute the edits. Return true to forbid the operation(s); no edits will be executed.
    false
    
    featureSelectionByDefault?: boolean

    Select a feature by default on tap/pointerup event.

    true
    
    geoFence?: number | false

    Define the pixel radius of the area within a shape point of a Navlink Feature can be moved by mouse/touch interaction.

    geoFence not supported.

    false - deactivated by default.
    
    intersectionScale?: number

    Defines the coordinate precision for the automatic intersection detection. Number of decimal points of the WGS coordinates that must match.

    5
    
    keepFeatureSelection?: string | boolean

    Keep features selected after mapview-change or click on the "ground" of the map. if set to false -> will be cleared after viewport change and click on ground. if set to "viewportChange" -> will only be cleared on ground click. if set to true -> no clear at all.

    "viewportChange"
    
    layers?: TileLayer[]

    define the TileLayers that should be edited with the Editor

    maxRoutingPointDistance?: number

    The maximum allowed distance of the "Routing Point" to the Address/Place itself in meters.

    1000 - 1000 meters
    
    place?: { autoResolveRoutingPoint?: boolean }

    Configure Place feature behavior.

    Type Declaration

    • OptionalautoResolveRoutingPoint?: boolean

      Automatically resolve to the nearest Navlink when no valid routing point is available.

      false
      
    routingPointPrecision?: number

    The "routingPointPrecision" defines the number of decimal places of the position of a routing point when it is changed.

    5
    
    services?: {
        reverseGeocoder?: {
            getISOCC?(
                longitude: number,
                latitude: number,
                callback: (isoCC: string) => void,
            ): string;
        };
    }

    Optional service settings.

    Type Declaration

    • OptionalreverseGeocoder?: {
          getISOCC?(
              longitude: number,
              latitude: number,
              callback: (isoCC: string) => void,
          ): string;
      }

      define reverseGeocoder service/functionality to request the address for a geographical position.

      • getISOCC?: function
        • Get the iso country code for a geographical position. If "getISOCC" is defined, the iso country code will be attached to all newly created features before sending to remote datasource.

          Parameters

          • longitude: number
          • latitude: number
          • callback: (isoCC: string) => void

          Returns string

          {
          reverseGeocoder:
          {
          getISOCC(lon: number, lat: number, callback:(isocc:string)=>void){
          // do a reverse geocode request to get the isocc value
          const isocc = "theIsoCountryCode";

          callback(isocc);
          }
          }
          }
    snapTolerance?: number

    The distance in meters between each of two coordinates/shape-points where snapping occurs. Two coordinates/shape-points closer than this parameter will be joined to a single point.

    2