///
import { OnInit, EventEmitter, NgZone, ElementRef, OnDestroy, ChangeDetectorRef, OnChanges, AfterViewInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MarkerInfo } from '../../models/marker-info.model';
import { GoogleMapsAPIWrapper, AgmInfoWindow, InfoWindowManager } from '@agm/core';
import { MapMarker } from '../../models/map-marker.model';
import { MapConversions } from '../../utils/conversions';
import { FormControl } from '@angular/forms';
import { MapsAPILoader } from '@agm/core';
import { Subscription, Observable } from 'rxjs';
import { MapService } from '../../services/map.service';
import { BreakpointObserver } from '@angular/cdk/layout';
import { MarkerData } from '../../models/marker-data.model';
import { LocationInfoService } from '../../services/location-info.service';
import { UserMap } from '../../models/user-map.model';
import { IconImageObject } from '../../models/icon-image-object.model';
import { ActivityModel } from '../../models/activity.model';
import { ActivityGroupModel } from '../../models/activity-group.model';
export declare class LcuMapComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
protected breakpointObserver: BreakpointObserver;
protected changeDetector: ChangeDetectorRef;
protected dialog: MatDialog;
protected infoWindowManager: InfoWindowManager;
protected locationInfoService: LocationInfoService;
protected mapConversions: MapConversions;
protected mapService: MapService;
protected mapsAPILoader: MapsAPILoader;
protected ngZone: NgZone;
protected wrapper: GoogleMapsAPIWrapper;
/**
* keys that should not trigger a new search
*/
protected nonEssentialKeys: Array;
/**
* The default lat/lng to show on map
*/
protected defaultLocationData: {
zoom: number;
lat: number;
lng: number;
};
/**
* The place id of the location the user clicked on
*
* This will be replaced by a direct call when AGM team puts out fix that allows user's click event
* to return place id directly from (mapClick)
*/
protected placeId: string;
/**
* The list of custom marker options for use in the custom marker location search
*/
protected options: MapMarker[];
protected lastBoundsChangeMillisecond: number;
/**
* Boolean that determines whether or not the user is in the middle of a double-click
*/
protected isDoubleClick: boolean;
/**
* The maximum amount of time in milliseconds the average person expects between clicks of a double-click
*/
protected expectedDoubleClickElapsedTime: number;
protected _visibleLocations: any;
/**
* The NE and SW lat/lng set of the current map
*/
protected currentBounds: {
neLat: number;
neLng: number;
swLat: number;
swLng: number;
};
/**
* Input property that allows panning to a certain lat/lng and zoom level on the current map
*/
protected _panTo: {
lat: number;
lng: number;
zoom: number;
};
/**
* The subscription for the basic-info-window modal
*/
protected markerInfoSubscription: Subscription;
/**
* The subscription for the google api call
*/
protected googlePlacesApiSubscription: Subscription;
/**
* The open panels represented by their indexes
*/
protected _openPanels: Array;
/**
* Subscription for the break point observer(determines the screen size the app is running on)
*/
protected observerSubscription: Subscription;
/**
* The displayed journey
*/
protected _displayedJourney: any;
/** The list of locations needed to populate the locations on individual activities */
protected _amblOnLocationArray: any;
/**
* Subscription to service that determines where the map should first open up to when accessed via a journey
*/
protected forcePanToSubscription: Subscription;
/**
* Boolean that determines whether to show the indicator at the top of the legend
*/
ShowUpIndicator: boolean;
/**
* Boolean that determines whether to show the indicator at the bottom of the legend
*/
ShowDownIndicator: boolean;
/**
* The height of the legend container
*/
LegendContainerHeight: number;
CheckBounds: boolean;
/**
* Determines where to place the indicator at the bottom of the legend (its 'top' value)
*/
DownIndicatorOffset: number;
/**
* boolean value that determines if the MapMarker already exists and is being edited
*/
isEdit: boolean;
ZoomOptions: object;
/**
* The minimum zoom level (so map can't show too far out)
*/
MinZoom: number;
/**
* Indicates whether or not the layers dropdown will be displayed
*/
ShowLayersDropdown: boolean;
/**
* The new map marker returned from the footer
*/
NewMapMarker: MapMarker;
/**
* Data that is being passed to the footer
*/
MarkerData: MarkerData;
/**
* Determines whether or not the current info box belongs to the journey or not (determines its display layout)
*/
BelongsToJourney: boolean;
/**
* subscribes to map service to find out when legend's top lists button was clicked
*/
TopListsSubscription: Subscription;
/**
* The zoom level that determines the zoom level of the map - can be changed
*/
CurrentZoom: number;
/**
* The value that determines the longitude of the map - can be changed
*/
CurrentLongitude: number;
/**
* Thevalue that determines the latitude of the map - can be changed
*/
CurrentLatitude: number;
/**
* Is true when screen size is small or xs, false otherwise
*/
IsMobile: boolean;
/**
* The boolean that is passed to the footer to display or not display the footer
*/
DisplayFooter: boolean;
/**
* indicates whether or not to show the dropdown list for the search bar
*/
displayAutocompleteOptions: boolean;
/**
* The current map marker that someone has selected to diplay info
*/
CurrentMapMarker: MapMarker;
/**
* Boolean that controls the checked/unchecked state of the primary checkbox (layer)
*/
PrimaryChecked: boolean;
/**
* Boolean that controls the checked/unchecked state of all the secondary checkboxes (layers)
*/
SecondaryChecked: boolean;
/**
* determines whether or not to display the search options with search bars
*/
DisplaySearchOptions: boolean;
/**
* The user's chosen search method for the location search (custom or native Google locations)
*/
SearchMethod: string;
/**
* Boolean that indicates whether or not the user is currently editing a journey's title
*/
EditingJourneyTitle: boolean;
/**
* The list of choices of location search methods for user to choose
*
*/
SearchMethods: Array;
/**
* Input property that represents the current primary map
*/
_currentMapModel: any;
/**
* Input property that represents the locations and their order saved in memory
*/
_savedLegendLocations: Array;
/**
* The location markers that are currently being displayed
*/
CurrentlyActiveLocations: Array;
/**
* The current Google location selected to display in legend as highlighted
*/
SelectedLocation: ActivityModel;
/**
* The current user map marker selected to display Basic info popover
*/
SelectedMarker: MapMarker;
/**
* The reference to the more info window dialog defined upon the window being populated
*/
protected moreInfoWindowDR: any;
/**
* Boolean that determines whether or not the search bar should be shown
*/
ShowSearchBar: boolean;
/**
* Boolean that determines whether or not to show the map legend
*/
ShowJourneyLegend: boolean;
/**
* Whether or not to show the add menu
*/
ShowNewOptions: boolean;
/**
* The array of options that are displayed when the + icon is selected
*/
NewOptions: Array;
/**
* The map type (standard, satellite, topographical) - default is standard ('roadmap')
*/
CurrentMapViewType: string;
/**
* The public map model converted from the passed IndividualMap input
*/
CurrentMapModel: UserMap;
/**
* The list of locations that the user should be able to see on the map (may be able to remove this if it's not being used)
*/
_visibleLocationsMasterList: Array;
/**
* The form control for searching custom marker locations
*/
CustomLocationControl: FormControl;
/**
* The current locations based on the current state of the custom location search form control
*/
FilteredLocations: Observable;
/**
* The top margin of the legend, so the icons are always in line
*/
LegendMargin: string;
DisplayingMoreInfo: boolean;
prevInfoWindow: AgmInfoWindow;
/**
* The form control for the location search box
*/
SearchControl: FormControl;
/**
* The agmInfoWindow refrenced in the DOM
*/
amblInfoWindow: AgmInfoWindow;
ActivityLocationList: Array;
/**
* The search input box
*/
SearchElementRef: ElementRef;
/**
* The Info Window that displays when a Google map icon was clicked.
*/
GoogleInfoWindowRef: AgmInfoWindow;
MapJourneyDisplayContainer: ElementRef;
MapJourneyDisplay: ElementRef;
JourneyTitleEdit: ElementRef;
set DisplayedJourney(journey: any);
get DisplayedJourney(): any;
set AmblOnLocationArray(arr: any);
get AmblOnLocationArray(): any;
/**
* The array of available map views to be chosen by the user (default is roadmap)
*
*/
MapViewTypes: Array<{}>;
CustomSearchRepressDropdownCharacterCount: number;
CustomSearchMethod: string;
DisplayGoogleSearchMethod: boolean;
/**
* the results of the user's custom location query to be displayed
*/
CustomSearchInputResults: Array;
RepressSearchOptionsList: boolean;
UpdateVisibleLocationsManually: Array;
/**
* determines whether or not to include the save map feature
*
* TODO: will likely turn into simply a button and leave the entire implementation of this modal to parent component
*/
IncludeSaveMapFeature: boolean;
/**
* Takes a MapMarker passed from the legend and passes it to DisplayMarkerInfo
*/
/**
* The default marker in the instance of a location not having an icon
*
*/
/** tslint:disable-next-line:no-input-rename */
DefaultMarker: IconImageObject;
/**
* Setter for the input '_panTo' field - also sets the lat/lng and zoom of the current map model
*/
set PanTo(value: {
lat: number;
lng: number;
zoom: number;
});
/**
* Getter for the field '_panTo'
*/
get PanTo(): {
lat: number;
lng: number;
zoom: number;
};
set VisibleLocationsMasterList(value: Array);
get VisibleLocationsMasterList(): Array;
/**
* The set of map markers and image paths that will be used to determine available map markers for current map
*/
MapMarkerSet: MarkerInfo[];
/**
* The setter for the current map model
*/
set MapModel(value: UserMap);
/**
* The getter for the current map model
*/
get MapModel(): UserMap;
set OpenPanels(arr: number[]);
get OpenPanels(): number[];
set VisibleLocations(value: Array);
ExcludedLocations: Array;
/**
* The event emitted when a map is saved (the saved map is emitted)
*/
MapSaved: EventEmitter;
JourneyChanged: EventEmitter;
JourneyCopied: EventEmitter;
JourneyShared: EventEmitter;
LegendIconClicked: EventEmitter;
/**
* The event emitted when the primary map's location list is altered (the new map is emitted)
*/
/**
* The Event that is emitted when a user creates a new location
*/
AddLocation: EventEmitter;
EditLocation: EventEmitter;
UpdateExcludedCurations: EventEmitter;
/**
* The event emitted when a layer is clicked - emits list of active secondary locations
*/
VisibleLocationListChanged: EventEmitter;
SearchLocationChosen: EventEmitter;
/**
* The event emitted when the legend is closed and the order/locations are saved to local storage
*/
EditedLegendLocations: EventEmitter>;
CustomSearchChange: EventEmitter;
LocationsToDelete: EventEmitter>;
/**
* emits event to parent that the legend's top lists button was clicked
*/
TopListsButtonClicked: EventEmitter;
CurrentPanelOpenState: EventEmitter>;
constructor(breakpointObserver: BreakpointObserver, changeDetector: ChangeDetectorRef, dialog: MatDialog, infoWindowManager: InfoWindowManager, locationInfoService: LocationInfoService, mapConversions: MapConversions, mapService: MapService, mapsAPILoader: MapsAPILoader, ngZone: NgZone, wrapper: GoogleMapsAPIWrapper);
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnChanges(): void;
ngOnDestroy(): void;
onMapReady(map?: google.maps.Map): void;
/**
*
* @param event the array of activity groups
*
* Event that gets emitted when an activity group changes
*/
ActivityGroupsChanged(event: Array): void;
CalcBounds(childBounds: any): void;
/**
*
* @param event the notes to save
* @param marker the activity of the notes that changed
*
* Runs when the user saves notes from the map
*/
NotesSaved(event: any, marker: any): void;
ToggleFavorited(event: boolean, marker: ActivityModel): void;
/**
* Breakpoints for screen sizes
*/
protected monitorBreakpoints(): void;
UpdateExcludedCurationsList(event: string): void;
/**
* Returns an array of strings that represent the titles of layers selected.
* Called by the legend to get the layer titles to be displayed in the legend.
*/
/**
*
* @param event the array of map markers
*
* Updates the visible locations
*/
UpdateVisibleLocations(event: Array): void;
CheckForHiddenLocations(): void;
EmitTopListsClick(event: string): void;
/**
*
* @param layer will be added to an array of active layers if it doesnt already exist in the array
*/
DeleteLocations(event: any): void;
/**
* Legend uses this function to take incoming data from child class and sets the according values to allow panning.
* @param value the value passed in
*/
/**
* Saves the legend order/loactions via event emmiter.
* @param val the value passed in
*/
/**
* Toggles the location search bar hidden / shown.
*/
ShowLocationSearchBarClicked(): void;
/**
* Runs when user single-clicks location on map. Modal displays prompting user to enter info about custom location marker.
* @param event The event passed in upon user clicking the map.
*/
OnChoseLocation(event: any): void;
/**
* Function that sets property 'isDoubleClicked' to true for a moment.
* This is necessary because when the events 'mapClick' and 'mapDblClick' appear on the same component, both will be fired.
*
* @param event The event passed in upon user double-clicking the map.
*/
OnMapDoubleClicked(event: any): void;
/**
* Activates the dialog for user to enter name of map which will then be 'saved'.
*/
/**
* Run when user clicks a custom location marker from custom location search.
*/
DropdownItemChosen(loc: any): void;
/**
* called when the user has selected a new location to add to their journey and adds activity
* to the last activity group and give it an order
*
* @param event
*/
addIconClicked(event: ActivityModel): void;
/**
* Displays / hides the map markers of the chosen layer (map) in the 'layers' dropdown.
*
* @param layer The layer (map) configuration sent in when a 'layer' checkbox is checked/unchecked.
*/
/**
* Sets currentBounds to the map's exact boundary whenever the boundary of the map changes.
*
* @param event The event sent every time the boundary of the map changes.
*/
/**
* Emits the current value of the custom search bar each time user types something.
*
* @param e the value of the user-typed text
*/
CustomSearchInputChange(e: any): void;
/**
* Calls the method that pans user to location and shows the location modal.
*
* @param e the event passed when user selects an option from the mat-autocomplete dropdown.
*/
LocationOptionSelected(e: any): void;
/**
* Angular function for use in custom marker location search.
*/
DisplayFn(marker?: MapMarker): string | undefined;
UpdateCurrentZoom(event: number): void;
/**
*
* @param val Toggles the displayFooter property to true or false.
*/
ShowFooter(val: boolean): void;
/**
* Toggles the add menu
*/
ShowAddMenu(): void;
/**
* Toggles the layer dropdown
*/
ShowLayers(): void;
/**
* called when the share icon in the toolbar is clicked
*/
ShareClicked(): void;
/**
* Toggles the EditingJourneyTitle boolean
*/
EditJourneyTitle(): void;
/**
*
* @param newTitle the new journey's title
*
* Emits the journey's new title and toggles the EditingJourneyTitle to false
*/
DoneEditingJourneyTitle(newTitle: any): void;
NewOptionClicked(action: any): void;
onActivityLocationClicked(activityLocation: any): void;
onJourneyChanged(event: any): void;
/**
* @param event
*
* sets the NewMapMarker value to the event and passes the value to SaveNewMarker
*/
SetNewMapMarker(event: MapMarker): void;
/**
*
* @param e the mouse event run when user clicks anywhere on the map
*
* closes certain elements based on the target of the mouse event
*/
OnDocClick(e: any): void;
/**
* Saves the new MapMarker.
*
* @param marker The MapMarker to save.
*
*/
SaveNewMarker(marker: MapMarker): void;
OnUserChoseIcon(icon: string, location: ActivityModel): void;
LegendTopIconClicked(event: any): void;
DisplayMoreInfo(marker: MapMarker): void;
/**
* When a user clicks on an icon it calls this method which opens the BasicInfoWindowComponent.
*
* @param marker holds the MapMarker with all its information to be displayed in the basic info window.
*/
/**
* Attaches a click listener to the map that returns an object that includes the place id.
* The place id is then assigned to the placeId field for use in the (mapClick) event.
* This will be removed once AGM team releases code that passes back the place id on (mapClick) directly.
*
* @param map The map onto which the click event listener will be attached
*/
OnMapReady(map: any): void;
/**
* Assigns order to the activity groups
*/
protected assignOrder(): void;
OnPanelOpenStateChanged(event: any): void;
protected updateItinerary(typeChange: string): void;
protected getBasicDayActivityGroup(dayCount?: number): ActivityGroupModel;
protected getNewActivity(title?: string, widgetIcon?: string): ActivityModel;
protected getFullDayActivityGroup(dayCount?: number): ActivityGroupModel;
protected getExtrasActivityGroup(): {
Title: string;
GroupType: string;
Checked: boolean;
ID: any;
Activities: any;
};
protected getValidOptionsTitle(): string;
/**
* Sets up the search filtering for the custom marker search.
*/
protected setUpCustomMarkerSearch(): void;
/**
* Strips locations that don't exist within the bounds and returns the altered array.
* TODO: write the edge case for locations that exist on map where lat or lng overlap
*
* @param locationList The list of locations that come with the map that should be stripped
* @param bounds The bounds used to determine which locations to strip
*/
/**
* Runs the boiler plate code that sets up location searching for AGM Google Maps.
*/
protected runAutocompleteSearchPrep(): void;
/**
*
* @param results the results of the google api call
*
* takes the results of a google api call and opens the info window for that place
*/
protected callDisplayMarkerWithGooglePlaceDetails(results: any): void;
/**
* sets up the search methods (if any) on which to search the map
*/
/**
*
* @param googleResults the results from the google places api call
*
* takes google places api call results and returns object of indices where necessary regional data exists
*/
protected getLocationRegionIndices(googleResults: any): any;
/**
* Assigns the lat/lng and zoom for the first activity on a journey
*/
protected assignDefaultMapConfiguration(): void;
/**
*
* @param mapMarkerData the results of the google api call
*
* @param isLat boolean that indicates whether to return latitude data or longitude data
*
* takes google places api call results and lat/lng boolean and returns normalized values for latitude or longitude
*/
protected normalizeLatitudeAndLongitude(mapMarkerData: any, isLat: boolean): number;
/**
* Filter for use in custom marker location search.
*/
protected filterCustomLocations(title: string): Array;
/**
* Sets primary layer to checked and secondary layers to unchecked and resets active location.
*/
/**
* Sets _currentMapModel.orgin to the values of the incoming lat and long.
* ParseFloat is added to the incoming value in the instance that it is saved as a string.
* AGM can only take Numbers as the lat and long values, strings will not process correctly.
* Random decimal point are appended due to the fact the AGM uses == to determine current lat/long/zoom.
* If random decimals are not added then the map will not zoom/pan once user moves the map.
*
* @param value the point (lat / lng) to pan to
*
* commented out due to Mox not wanting it to recenter
*/
protected zoomInToPoint(value: any): void;
/**
* Takes and array of photos returned from the google api and pulls the photo reference out
* and builds the url to call so image displays. (currently only pulling one image from loop).
*
* @param photos the photos passed in
*/
protected buildPhotoArray(photos: Array): Array;
/**
* Opens the 'More Info' dialog when the button is pressed in the 'Basic Info' info window.
*
* @param marker The MapMarker data to pass to the 'More Info' dialog.
*/
protected openMoreInfoDialog(marker: MapMarker): void;
/**
* Called when the user selects a location from the google search
* @param searchedLocation the activity to search
*/
ShowSearchedLocation(searchedLocation: ActivityModel): void;
/**
* Handles the show/hide lifecycle of a selected AMBL-ON Map Marker and initializes the
* basic info popover to display Map Marker information.
*
* @param infoWindow The current AGM info window.
* @param marker The Map Marker that was selected.
*/
OnMarkerClicked(infoWindow: AgmInfoWindow, marker: MapMarker): void;
/**
* Handles the show/hide lifecycle of a selected GOOGLE Map Marker and initializes the
* basic info popover to display Map Marker information.
*
* @param infoWindow The current AGM info window.
* @param marker The Map Marker that was selected.
*/
OnLocationClicked(infoWindow: AgmInfoWindow, marker: MapMarker): void;
}