447 lines
No EOL
48 KiB
JavaScript
Executable file
447 lines
No EOL
48 KiB
JavaScript
Executable file
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
|
|
/// <reference types="google.maps" preserve="true" />
|
|
import { Input, Output, NgZone, Directive, inject, EventEmitter, } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
import { take } from 'rxjs/operators';
|
|
import { GoogleMap } from '../google-map/google-map';
|
|
import { MapEventManager } from '../map-event-manager';
|
|
import * as i0 from "@angular/core";
|
|
import * as i1 from "../google-map/google-map";
|
|
/**
|
|
* Default options for the Google Maps marker component. Displays a marker
|
|
* at the Googleplex.
|
|
*/
|
|
export const DEFAULT_MARKER_OPTIONS = {
|
|
position: { lat: 37.421995, lng: -122.084092 },
|
|
};
|
|
/**
|
|
* Angular component that renders a Google Maps marker via the Google Maps JavaScript API.
|
|
*
|
|
* See developers.google.com/maps/documentation/javascript/reference/marker
|
|
*/
|
|
export class MapMarker {
|
|
/**
|
|
* Title of the marker.
|
|
* See: developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.title
|
|
*/
|
|
set title(title) {
|
|
this._title = title;
|
|
}
|
|
/**
|
|
* Position of the marker. See:
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.position
|
|
*/
|
|
set position(position) {
|
|
this._position = position;
|
|
}
|
|
/**
|
|
* Label for the marker.
|
|
* See: developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.label
|
|
*/
|
|
set label(label) {
|
|
this._label = label;
|
|
}
|
|
/**
|
|
* Whether the marker is clickable. See:
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.clickable
|
|
*/
|
|
set clickable(clickable) {
|
|
this._clickable = clickable;
|
|
}
|
|
/**
|
|
* Options used to configure the marker.
|
|
* See: developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions
|
|
*/
|
|
set options(options) {
|
|
this._options = options;
|
|
}
|
|
/**
|
|
* Icon to be used for the marker.
|
|
* See: https://developers.google.com/maps/documentation/javascript/reference/marker#Icon
|
|
*/
|
|
set icon(icon) {
|
|
this._icon = icon;
|
|
}
|
|
/**
|
|
* Whether the marker is visible.
|
|
* See: developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.visible
|
|
*/
|
|
set visible(value) {
|
|
this._visible = value;
|
|
}
|
|
constructor(_googleMap, _ngZone) {
|
|
this._googleMap = _googleMap;
|
|
this._ngZone = _ngZone;
|
|
this._eventManager = new MapEventManager(inject(NgZone));
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.animation_changed
|
|
*/
|
|
this.animationChanged = this._eventManager.getLazyEmitter('animation_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.click
|
|
*/
|
|
this.mapClick = this._eventManager.getLazyEmitter('click');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.clickable_changed
|
|
*/
|
|
this.clickableChanged = this._eventManager.getLazyEmitter('clickable_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.cursor_changed
|
|
*/
|
|
this.cursorChanged = this._eventManager.getLazyEmitter('cursor_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.dblclick
|
|
*/
|
|
this.mapDblclick = this._eventManager.getLazyEmitter('dblclick');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.drag
|
|
*/
|
|
this.mapDrag = this._eventManager.getLazyEmitter('drag');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.dragend
|
|
*/
|
|
this.mapDragend = this._eventManager.getLazyEmitter('dragend');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.draggable_changed
|
|
*/
|
|
this.draggableChanged = this._eventManager.getLazyEmitter('draggable_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.dragstart
|
|
*/
|
|
this.mapDragstart = this._eventManager.getLazyEmitter('dragstart');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.flat_changed
|
|
*/
|
|
this.flatChanged = this._eventManager.getLazyEmitter('flat_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.icon_changed
|
|
*/
|
|
this.iconChanged = this._eventManager.getLazyEmitter('icon_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.mousedown
|
|
*/
|
|
this.mapMousedown = this._eventManager.getLazyEmitter('mousedown');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.mouseout
|
|
*/
|
|
this.mapMouseout = this._eventManager.getLazyEmitter('mouseout');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.mouseover
|
|
*/
|
|
this.mapMouseover = this._eventManager.getLazyEmitter('mouseover');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.mouseup
|
|
*/
|
|
this.mapMouseup = this._eventManager.getLazyEmitter('mouseup');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.position_changed
|
|
*/
|
|
this.positionChanged = this._eventManager.getLazyEmitter('position_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.rightclick
|
|
*/
|
|
this.mapRightclick = this._eventManager.getLazyEmitter('rightclick');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.shape_changed
|
|
*/
|
|
this.shapeChanged = this._eventManager.getLazyEmitter('shape_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.title_changed
|
|
*/
|
|
this.titleChanged = this._eventManager.getLazyEmitter('title_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.visible_changed
|
|
*/
|
|
this.visibleChanged = this._eventManager.getLazyEmitter('visible_changed');
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.zindex_changed
|
|
*/
|
|
this.zindexChanged = this._eventManager.getLazyEmitter('zindex_changed');
|
|
/** Event emitted when the marker is initialized. */
|
|
this.markerInitialized = new EventEmitter();
|
|
}
|
|
ngOnInit() {
|
|
if (!this._googleMap._isBrowser) {
|
|
return;
|
|
}
|
|
if (google.maps.Marker && this._googleMap.googleMap) {
|
|
this._initialize(this._googleMap.googleMap, google.maps.Marker);
|
|
}
|
|
else {
|
|
this._ngZone.runOutsideAngular(() => {
|
|
Promise.all([this._googleMap._resolveMap(), google.maps.importLibrary('marker')]).then(([map, lib]) => {
|
|
this._initialize(map, lib.Marker);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
_initialize(map, markerConstructor) {
|
|
// Create the object outside the zone so its events don't trigger change detection.
|
|
// We'll bring it back in inside the `MapEventManager` only for the events that the
|
|
// user has subscribed to.
|
|
this._ngZone.runOutsideAngular(() => {
|
|
this.marker = new markerConstructor(this._combineOptions());
|
|
this._assertInitialized();
|
|
this.marker.setMap(map);
|
|
this._eventManager.setTarget(this.marker);
|
|
this.markerInitialized.next(this.marker);
|
|
});
|
|
}
|
|
ngOnChanges(changes) {
|
|
const { marker, _title, _position, _label, _clickable, _icon, _visible } = this;
|
|
if (marker) {
|
|
if (changes['options']) {
|
|
marker.setOptions(this._combineOptions());
|
|
}
|
|
if (changes['title'] && _title !== undefined) {
|
|
marker.setTitle(_title);
|
|
}
|
|
if (changes['position'] && _position) {
|
|
marker.setPosition(_position);
|
|
}
|
|
if (changes['label'] && _label !== undefined) {
|
|
marker.setLabel(_label);
|
|
}
|
|
if (changes['clickable'] && _clickable !== undefined) {
|
|
marker.setClickable(_clickable);
|
|
}
|
|
if (changes['icon'] && _icon) {
|
|
marker.setIcon(_icon);
|
|
}
|
|
if (changes['visible'] && _visible !== undefined) {
|
|
marker.setVisible(_visible);
|
|
}
|
|
}
|
|
}
|
|
ngOnDestroy() {
|
|
this.markerInitialized.complete();
|
|
this._eventManager.destroy();
|
|
this.marker?.setMap(null);
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getAnimation
|
|
*/
|
|
getAnimation() {
|
|
this._assertInitialized();
|
|
return this.marker.getAnimation() || null;
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getClickable
|
|
*/
|
|
getClickable() {
|
|
this._assertInitialized();
|
|
return this.marker.getClickable();
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getCursor
|
|
*/
|
|
getCursor() {
|
|
this._assertInitialized();
|
|
return this.marker.getCursor() || null;
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getDraggable
|
|
*/
|
|
getDraggable() {
|
|
this._assertInitialized();
|
|
return !!this.marker.getDraggable();
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getIcon
|
|
*/
|
|
getIcon() {
|
|
this._assertInitialized();
|
|
return this.marker.getIcon() || null;
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getLabel
|
|
*/
|
|
getLabel() {
|
|
this._assertInitialized();
|
|
return this.marker.getLabel() || null;
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getOpacity
|
|
*/
|
|
getOpacity() {
|
|
this._assertInitialized();
|
|
return this.marker.getOpacity() || null;
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getPosition
|
|
*/
|
|
getPosition() {
|
|
this._assertInitialized();
|
|
return this.marker.getPosition() || null;
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getShape
|
|
*/
|
|
getShape() {
|
|
this._assertInitialized();
|
|
return this.marker.getShape() || null;
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getTitle
|
|
*/
|
|
getTitle() {
|
|
this._assertInitialized();
|
|
return this.marker.getTitle() || null;
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getVisible
|
|
*/
|
|
getVisible() {
|
|
this._assertInitialized();
|
|
return this.marker.getVisible();
|
|
}
|
|
/**
|
|
* See
|
|
* developers.google.com/maps/documentation/javascript/reference/marker#Marker.getZIndex
|
|
*/
|
|
getZIndex() {
|
|
this._assertInitialized();
|
|
return this.marker.getZIndex() || null;
|
|
}
|
|
/** Gets the anchor point that can be used to attach other Google Maps objects. */
|
|
getAnchor() {
|
|
this._assertInitialized();
|
|
return this.marker;
|
|
}
|
|
/** Returns a promise that resolves when the marker has been initialized. */
|
|
_resolveMarker() {
|
|
return this.marker
|
|
? Promise.resolve(this.marker)
|
|
: this.markerInitialized.pipe(take(1)).toPromise();
|
|
}
|
|
/** Creates a combined options object using the passed-in options and the individual inputs. */
|
|
_combineOptions() {
|
|
const options = this._options || DEFAULT_MARKER_OPTIONS;
|
|
return {
|
|
...options,
|
|
title: this._title || options.title,
|
|
position: this._position || options.position,
|
|
label: this._label || options.label,
|
|
clickable: this._clickable ?? options.clickable,
|
|
map: this._googleMap.googleMap,
|
|
icon: this._icon || options.icon,
|
|
visible: this._visible ?? options.visible,
|
|
};
|
|
}
|
|
_assertInitialized() {
|
|
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
if (!this.marker) {
|
|
throw Error('Cannot interact with a Google Map Marker before it has been ' +
|
|
'initialized. Please wait for the Marker to load before trying to interact with it.');
|
|
}
|
|
}
|
|
}
|
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0-next.2", ngImport: i0, type: MapMarker, deps: [{ token: i1.GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.0-next.2", type: MapMarker, isStandalone: true, selector: "map-marker", inputs: { title: "title", position: "position", label: "label", clickable: "clickable", options: "options", icon: "icon", visible: "visible" }, outputs: { animationChanged: "animationChanged", mapClick: "mapClick", clickableChanged: "clickableChanged", cursorChanged: "cursorChanged", mapDblclick: "mapDblclick", mapDrag: "mapDrag", mapDragend: "mapDragend", draggableChanged: "draggableChanged", mapDragstart: "mapDragstart", flatChanged: "flatChanged", iconChanged: "iconChanged", mapMousedown: "mapMousedown", mapMouseout: "mapMouseout", mapMouseover: "mapMouseover", mapMouseup: "mapMouseup", positionChanged: "positionChanged", mapRightclick: "mapRightclick", shapeChanged: "shapeChanged", titleChanged: "titleChanged", visibleChanged: "visibleChanged", zindexChanged: "zindexChanged", markerInitialized: "markerInitialized" }, exportAs: ["mapMarker"], usesOnChanges: true, ngImport: i0 }); }
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0-next.2", ngImport: i0, type: MapMarker, decorators: [{
|
|
type: Directive,
|
|
args: [{
|
|
selector: 'map-marker',
|
|
exportAs: 'mapMarker',
|
|
standalone: true,
|
|
}]
|
|
}], ctorParameters: () => [{ type: i1.GoogleMap }, { type: i0.NgZone }], propDecorators: { title: [{
|
|
type: Input
|
|
}], position: [{
|
|
type: Input
|
|
}], label: [{
|
|
type: Input
|
|
}], clickable: [{
|
|
type: Input
|
|
}], options: [{
|
|
type: Input
|
|
}], icon: [{
|
|
type: Input
|
|
}], visible: [{
|
|
type: Input
|
|
}], animationChanged: [{
|
|
type: Output
|
|
}], mapClick: [{
|
|
type: Output
|
|
}], clickableChanged: [{
|
|
type: Output
|
|
}], cursorChanged: [{
|
|
type: Output
|
|
}], mapDblclick: [{
|
|
type: Output
|
|
}], mapDrag: [{
|
|
type: Output
|
|
}], mapDragend: [{
|
|
type: Output
|
|
}], draggableChanged: [{
|
|
type: Output
|
|
}], mapDragstart: [{
|
|
type: Output
|
|
}], flatChanged: [{
|
|
type: Output
|
|
}], iconChanged: [{
|
|
type: Output
|
|
}], mapMousedown: [{
|
|
type: Output
|
|
}], mapMouseout: [{
|
|
type: Output
|
|
}], mapMouseover: [{
|
|
type: Output
|
|
}], mapMouseup: [{
|
|
type: Output
|
|
}], positionChanged: [{
|
|
type: Output
|
|
}], mapRightclick: [{
|
|
type: Output
|
|
}], shapeChanged: [{
|
|
type: Output
|
|
}], titleChanged: [{
|
|
type: Output
|
|
}], visibleChanged: [{
|
|
type: Output
|
|
}], zindexChanged: [{
|
|
type: Output
|
|
}], markerInitialized: [{
|
|
type: Output
|
|
}] } });
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLW1hcmtlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9nb29nbGUtbWFwcy9tYXAtbWFya2VyL21hcC1tYXJrZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgseUVBQXlFO0FBQ3pFLHFEQUFxRDtBQUVyRCxPQUFPLEVBQ0wsS0FBSyxFQUdMLE1BQU0sRUFDTixNQUFNLEVBQ04sU0FBUyxFQUdULE1BQU0sRUFDTixZQUFZLEdBQ2IsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLE1BQU0sQ0FBQztBQUNoQyxPQUFPLEVBQUMsSUFBSSxFQUFDLE1BQU0sZ0JBQWdCLEN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