Feature attributes that have been formatted for display.

interface PresentableAttributes {
    _handles: Handles<unknown, ResourceHandle>;
    _originalMap: ObservableMap<string, string>;
    [toStringTag]: "ObservableMap";
    @eventTypes: MapEvents<string, string>;
    get size(): number;
    [iterator](): MapIterator<[string, string]>;
    clear(): void;
    delete(key: string): boolean;
    destroy(): void;
    emit<Type>(type: Type, event?: MapEvents<string, string>[Type]): boolean;
    entries(): MapIterator<[string, string]>;
    forEach(callbackfn: ((value: string, key: string, map: Map<string, string>) => void), thisArg?: unknown): void;
    get(key: string): string;
    has(key: string): boolean;
    keys(): MapIterator<string>;
    on<Type>(type: Type, listener: EventedCallback<MapEvents<string, string>[Type]>): IHandle;
    set(key: string, value: string): this;
    toJSON(): unknown;
    values(): MapIterator<string>;
}

Hierarchy (view full)

Properties

_handles: Handles<unknown, ResourceHandle>
_originalMap: ObservableMap<string, string>

The underlying map that this object is delegating to.

[toStringTag] = "ObservableMap"

Used by Object.toString().

@eventTypes: MapEvents<string, string>

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

Accessors

  • get size(): number
  • The number of elements.

    Returns number

Methods

  • Returns the [key, value] pairs for each element in the map in insertion order.

    Returns MapIterator<[string, string]>

  • Removes the specified element.

    Parameters

    • key: string

      The element's key.

    Returns boolean

    True if an element was deleted, otherwise false.

  • Emits an event on the instance. This method should only be used when creating subclasses of this class.

    Type Parameters

    Parameters

    • type: Type

      The name of the event.

    • Optionalevent: MapEvents<string, string>[Type]

      The event payload.

    Returns boolean

    true if a listener was notified

    4.5

  • Returns the [key, value] pairs for each element in the map in insertion order.

    Returns MapIterator<[string, string]>

  • Executes a provided function once per each key/value pair in the map.

    Parameters

    • callbackfn: ((value: string, key: string, map: Map<string, string>) => void)

      Function to execute for each element.

        • (value, key, map): void
        • Parameters

          • value: string
          • key: string
          • map: Map<string, string>

          Returns void

    • OptionalthisArg: unknown

      Value to use as this when executing callback.

    Returns void

  • Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

    Parameters

    • key: string

    Returns string

    Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

  • Indicates whether or not an element with the specified key exists.

    Parameters

    • key: string

      The key to test for.

    Returns boolean

  • Returns the keys for each element in the map in insertion order.

    Returns MapIterator<string>

  • Registers an event handler on the instance. Call this method to hook an event with a listener.

    Type Parameters

    Parameters

    • type: Type

      An event or an array of events to listen for.

    • listener: EventedCallback<MapEvents<string, string>[Type]>

      The function to call when the event fires.

    Returns IHandle

    Returns an event handler with a remove() method that should be called to stop listening for the event(s).

    Property Type Description
    remove Function When called, removes the listener from the event.
    view.on("click", function(event){
    // event is the event handle returned after the event fires.
    console.log(event.mapPoint);
    });
  • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

    Parameters

    • key: string
    • value: string

    Returns this

  • Returns a serializable representation of the map.

    Returns unknown

  • Returns the values for each element in the map in insertion order.

    Returns MapIterator<string>