@vertigis/viewer-spec
Version:
VertiGIS Viewer Specification
75 lines (74 loc) • 1.93 kB
TypeScript
import type Viewpoint from "@arcgis/core/Viewpoint.js";
import type { Command } from "../Command.js";
import { CommandRegistry } from "../CommandRegistry.js";
import type { Event } from "../Event.js";
import { EventRegistry } from "../EventRegistry.js";
import type { MapsFeatureResultArgs } from "../common.js";
import type { SearchArgs } from "./tasks.js";
/**
* The search source.
*/
export type SearchSource = "addresses" | "features";
/**
* Arguments for the search.completed event.
*/
export interface SearchCompletedArgs extends MapsFeatureResultArgs {
/**
* The maximum number of search results that could be returned.
*/
maxResults: number;
/**
* The text used in the search.
*/
searchText: string;
/**
* The map viewpoint at the time of the search.
*/
mapViewpoint: Viewpoint;
}
export declare class SearchCommands extends CommandRegistry {
protected readonly _prefix = "search";
/**
* Clears the search input.
*/
get clear(): Command;
/**
* Sets the search source. Mobile only.
*
* @mobileOnly
*/
get setSource(): Command<SearchSource>;
}
export declare class SearchEvents extends EventRegistry {
protected readonly _prefix = "search";
/**
* Raised when a search component is activated. Mobile only.
*
* @mobileOnly
*/
get activated(): Event;
/**
* Raised when a search has been cleared. Mobile only.
*
* @mobileOnly
*/
get cleared(): Event;
/**
* Raised when a search component is deactivated. Mobile only.
*
* @mobileOnly
*/
get deactivated(): Event;
/**
* Raised when a search completes. Mobile only.
*
* @mobileOnly
*/
get completed(): Event<SearchCompletedArgs>;
/**
* Raised when a search begins. Mobile only.
*
* @mobileOnly
*/
get started(): Event<SearchArgs>;
}