import { EventEmitter } from '@angular/core'; import { MarkerInfo, MapMarker, UserMap } from '@lowcodeunit/lcu-map-common'; import { ThumbnailListModel } from '../models/thumbnail-list.model'; import { Subject } from 'rxjs'; import { TempStorageService } from './temp.storage.service'; import { LocationLoader } from '../utils/location-loader'; import { UsersStateContext } from '../state/users/users-state-manager.context'; import { UsersState } from '../state/users/users-state.model'; export declare class MapService { protected tempStorage: TempStorageService; protected locLoader: LocationLoader; protected userState: UsersStateContext; /** * The primary map to be displayed - represents the current map being displayed */ protected primaryMap: UserMap; /** * List of secondary maps available to choose as primary and also for use as layers in the primary map */ protected mapList: Array; State: UsersState; /** * Curated list of ambl_on location markers */ CuratedList: any; /** * This value is changed when the user select something from the Atlas */ Layers: any; /** * Emits new primary map any time the maps (primary and secondary) are changed */ MapChanged: EventEmitter; /** * Subject that emits lat/lng for map panning */ LatLngEmitter: Subject; BasicInfoWindowEmitter: Subject; /** * List of active secondary locations which are currently displayed on the current map */ VisibleLocations: Array; LegendLocations: Array; ThumbnailList: Array; /** * The list of available markers for use in the map */ MarkerList: MarkerInfo[]; /** * The hamburger menu subject to detect click event */ HamburgerMenuSubject: Subject; ApiRoot: string; constructor(tempStorage: TempStorageService, locLoader: LocationLoader, userState: UsersStateContext); ngOnInit(): void; SetApiRoot(root: string): void; GetApiRoot(): string; UpdatePrimaryAndSecondaryMaps(primary: UserMap, secondary: Array): void; GetHamburgerSubject(): Subject; ToggleHamburgerMenu(): void; GetLegendLocations(): MapMarker[]; /** * Returns this maplist list of thumbnails and their info */ GetThumbnailList(): ThumbnailListModel[]; /** * Returns the primary map to be displayed */ GetPrimaryMap(): UserMap; /** * Returns the list of secondary (non-primary) maps */ GetMapList(): Array; /** * Returns a list of all the maps in the db */ /** * * @param id The id of the map to retrieve * * Returns a specific map with a specific id */ GetMapById(id: string): UserMap; /** * Returns the list of available markers for use in map * * This will call a back end service eventually and then format the results accordingly */ GetMarkerList(): MarkerInfo[]; /** * * @param map The map to add * * Adds the map to the map array */ AddMap(map: any): void; /** * * @param lat The latitude to pan to * @param lng The longitude to pan to * * Takes a lat/lng and emits event for map to listen to */ ChangeLatLng(lat: any, lng: any, zoom: number): void; /** * @param marker * * Takes a marker from the legend and send to lcu-map */ DisplayBasicInfo(marker: MapMarker): void; /** * * @param list The list of visible locations * * When map updates the visible locations, this.VisibleLocations will be updated */ UpdateVisibleLocations(list: any): void; /** * Updates the legend array * @param list */ UpdateLegendLocations(list: any): void; CheckForDuplicates(list: Array): Array; /** * * @param list saves the legend to local storage */ /** * * @param map The map to replace the onld one with * * This replaces the map in the db with the map (based on id) */ ReplaceMap(map: UserMap): void; /** * * @param ListOfMaps The list of maps that you would like to get the thumbnails and other info for * * a thumbnail list contains the img url, the title of the map, and the lat and long of the orgin * */ /** * * @param id The id of the new primary map * * Calls the protected method "setMapsWithPrimaryId" */ PrimaryMapChanged(map: any): void; /** * Deletes all the maps from the db (for testing purposes only) */ DeleteMaps(): void; /** * Curated list of ambl_on location markers */ GetMapMarkersFromLocations(locations: any[], mapId: string): MapMarker[]; /** * * @param map The map configuration from which you want to create a thumbnail * @param width Optional width parameter (must also include heigth) * @param height Optional height parameter (must also include width) * * Takes a map configuration file and returns a google maps static map to be used as a thumbnail * * In order to specify height and width, you must specify BOTH, otherwise, the default is 300x300 */ GetMapThumbnail(map: UserMap, width?: number, height?: number): string; protected formatLocationList(locations: Array, mapId: string): Array; /** * * @param id The id of the new primary map * * Sets the primary map to that with the passed id, * * Sets the secondary maps to a list of all the maps minus that with the passed id * * Emits the new primary map */ protected setMapsWithPrimaryId(id: string): void; protected convertLocationDataToMapMarkers(locations: any[]): { ID: any; address: any; iconName: any; title: any; lat: any; lng: any; phoneNumber: any; town: any; country: any; }[]; }