UNPKG

@progress/kendo-angular-map

Version:
103 lines (102 loc) 4.62 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ChangeDetectionStrategy, Component, forwardRef, Input } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { CollectionService } from '../common/collection.service'; import { ConfigurationService } from '../common/configuration.service'; import { LayerComponent } from './layer.component'; import * as i0 from "@angular/core"; import * as i1 from "../common/configuration.service"; import * as i2 from "../common/collection.service"; import * as i3 from "@angular/platform-browser"; /** * Represents the Kendo UI MarkerLayer component for Angular. Displays data as markers on vector shape layers for marker maps. * * @example * ```typescript * @Component({ * selector: 'my-app', * template: ` * <kendo-map> * <kendo-map-marker-layer * [data]="markerData" * locationField="location" * titleField="title" * shape="pin"> * </kendo-map-marker-layer> * </kendo-map> * ` * }) * export class AppComponent { * public markerData = [ * { location: [40.7128, -74.0060], title: "New York" } * ]; * } * ``` * * @remarks * Supported children components are: {@link MarkerTooltipComponent}. */ export class MarkerLayerComponent extends LayerComponent { configurationService; collectionService; sanitizer; /** * Sets the array of data items for this layer. */ data; /** * Sets the data item field which contains the marker location. * The field should be an array with two numbers &mdash; latitude and longitude in decimal degrees. */ locationField; /** * Sets the data item field which contains the marker title. */ titleField; /** * Sets the default marker shape for data-bound markers. Supported marker shapes are `pinTarget` and `pin`. * Marker shapes are implemented as CSS classes on the marker element (`span.k-marker`). For example `pinTarget` is rendered as `k-marker-pin-target`. */ shape; constructor(configurationService, collectionService, sanitizer) { super('marker', configurationService, collectionService, sanitizer); this.configurationService = configurationService; this.collectionService = collectionService; this.sanitizer = sanitizer; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MarkerLayerComponent, deps: [{ token: i1.ConfigurationService }, { token: i2.CollectionService }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MarkerLayerComponent, isStandalone: true, selector: "kendo-map-marker-layer", inputs: { data: "data", locationField: "locationField", titleField: "titleField", shape: "shape" }, providers: [ ConfigurationService, { provide: LayerComponent, useExisting: forwardRef(() => MarkerLayerComponent) } ], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MarkerLayerComponent, decorators: [{ type: Component, args: [{ changeDetection: ChangeDetectionStrategy.OnPush, providers: [ ConfigurationService, { provide: LayerComponent, useExisting: forwardRef(() => MarkerLayerComponent) } ], selector: 'kendo-map-marker-layer', template: '', standalone: true }] }], ctorParameters: function () { return [{ type: i1.ConfigurationService }, { type: i2.CollectionService }, { type: i3.DomSanitizer }]; }, propDecorators: { data: [{ type: Input }], locationField: [{ type: Input }], titleField: [{ type: Input }], shape: [{ type: Input }] } });