-
Notifications
You must be signed in to change notification settings - Fork 2
Ansyn public API
import { AnsynApi } from '@ansyn/ansyn';
@Component({ ... }) export class AppComponent { constructor(protected ansynApi: AnsynApi) { } }
Ansyn as component exposes the following methods:
Controls the maps layout.
export type LayoutKey = 'layout1' | 'layout2' | 'layout3' | 'layout4' | 'layout5' | 'layout6';
export const layoutOptions = new Map<LayoutKey, IMapsLayout>([
['layout1', { id: 'layout1', mapsCount: 1 }],
['layout2', { id: 'layout2', mapsCount: 2 }],
['layout3', { id: 'layout3', mapsCount: 2 }],
['layout4', { id: 'layout4', mapsCount: 3 }],
['layout5', { id: 'layout5', mapsCount: 3 }],
['layout6', { id: 'layout6', mapsCount: 4 }]
]);
Subscribes to shadow mouse location event updates.
Usage example:
api.onShadowMouseProduce$.subscribe((coordinates) => console.log(coordinates))
Unsubscribes from shadow mouse location event updates.
Sets a shadow mouse location in the component.
Active Map Receives a position in EPSG:4326 and flies to the given location.
get active map position in EPSG:4326.
Usage Example:
export interface ICaseMapPosition {
projectedState?: ICaseMapProjectedState;
extentPolygon?: GEOJSON.Polygon;
}
export interface ICaseMapProjectedState {
projection: {
code: string;
};
center?: [number, number];
resolution?: number;
rotation?: number
zoom?: number;
}
register to active center changes
api.onShadowMouseProduce$.subscribe((coordinates) => console.log(coordinates))
rect
: a rectangle polygon. It should be closed (the last coordinate same as the first).
When the search
parameter is true
, the component performs a search for overlays, at the center
point.
Displays an overlay on map #mapNumber.
If the mapNumber param is omitted, display on the active map.
Sets overlays in the timeline.
export interface IOverlay {
id: string;
sourceType?: string;
footprint?: any;
sensorType?: string;
sensorName?: string;
channel?: number;
bestResolution?: number;
cloudCoverage?: number;
isStereo?: boolean;
name: string;
imageUrl?: string;
baseImageUrl?: string;
thumbnailUrl?: string;
photoTime: string;
date: Date;
azimuth: number; // radians
approximateTransform?: any;
csmState?: string;
isGeoRegistered: boolean;
tag?: any; // original metadata
projection?: string;
token?: string;
catalogID?: string,
}
Sets Anotations To all imagery maps
Remove all anotations from imagery
export interface IOverlaysCriteria {
time?: ICaseTimeState;
region?: CaseRegionState;
dataInputFilters?: ICaseDataInputFiltersState;
export interface ICaseTimeState {
type: 'absolute',
from: Date,
to: Date
}
export type CaseRegionState = any | Feature<Polygon> | Point | Polygon | Position;
export interface ICaseDataInputFiltersState {
fullyChecked: boolean,
filters: IDataInputFilterValue[],
active: boolean
}
export interface IDataInputFilterValue {
providerName: string,
sensorType: string,
sensorName: string
}
kills the map and dispose it's resources