UNPKG

ngx-amap

Version:

[![npm](https://img.shields.io/npm/v/ngx-amap.svg)][npm-badge-url] [![npm](https://img.shields.io/npm/dm/ngx-amap.svg)][npm-badge-url] [![Build Status](https://travis-ci.org/xieziyu/ngx-amap.svg?branch=master)][ci-url]

145 lines (144 loc) 4.29 kB
/// <reference types="@types/amap-js-api" /> import { OnDestroy, EventEmitter, SimpleChanges, OnChanges, QueryList, AfterContentInit, NgZone } from '@angular/core'; import { Subscription } from 'rxjs'; import { AMapOverlay } from '../../base/amap-overlay'; import { EventBinderService } from '../../shared/event-binder.service'; import { IPixel, IIcon, IMarkerLabel } from '../../interfaces'; import { AmapInfoWindowComponent } from '../../components/amap-info-window/amap-info-window.component'; import { AMapService } from '../../shared/amap.service'; import { WithCreate } from '../../base/interfaces'; import { LoggerService } from '../../shared/logger/logger.service'; import { PixelService } from '../../shared/pixel.service'; import { IconService } from '../../shared/icon.service'; import { MarkerLabelService } from '../../shared/marker-label.service'; import { AMapUISimpleMarker } from './ui-simple-marker.service'; export declare const SimpleMarkerOptions: string[]; export declare class UISimpleMarker extends AMapOverlay<any> implements OnDestroy, OnChanges, AfterContentInit { protected os: WithCreate<any>; protected binder: EventBinderService; protected amaps: AMapService; protected pixels: PixelService; protected icons: IconService; protected mlabels: MarkerLabelService; protected logger: LoggerService; protected ngZone: NgZone; TAG: string; /** * 样式主题 */ iconTheme: 'default' | 'fresh' | 'numv1' | 'numv2'; /** * 背景图标样式 */ iconStyle: string | object; /** * 图标前景文字 */ iconLabel: string | object; /** * 是否显示定位点 */ showPositionPoint: boolean | object; /** * 内建的Dom容器上附带的class,多个class name用空格分开 */ containerClassNames: string; /** * 点标记在地图上显示的位置 */ position: AMap.LocationValue; /** * 标记锚点 */ anchor: AMap.Marker.Anchor; /** * 点标记显示位置偏移量 */ offset: AMap.Pixel | IPixel; /** * 需在点标记中显示的图标 */ icon: string | AMap.Icon | IIcon; /** * 鼠标点击时marker是否置顶 */ topWhenClick: boolean; /** * 拖拽点标记时是否开启点标记离开地图的效果 */ raiseOnDrag: boolean; /** * 点标记是否可见 */ visible: boolean; /** * 点标记的叠加顺序 */ zIndex: number; /** * 点标记的旋转角度 */ angle: number; /** * 是否自动旋转 */ autoRotation: boolean; /** * 点标记的动画效果 */ animation: AMap.AnimationName; /** * 点标记阴影 */ shadow: AMap.Icon | string | IIcon; /** * 鼠标滑过点标记时的文字提示 */ title: string; /** * 可点击区域 */ shape: AMap.MarkerShape; /** * 文本标注 */ label: AMap.Marker.Label | IMarkerLabel; /** * 额外: 是否置顶 */ isTop: boolean; /** * 额外: 是否隐藏 */ hidden: boolean; /** * 额外: 是否包含在点聚合中 */ inCluster: boolean; /** * 额外: 点击时是否显示信息窗体 */ openInfoWindow: boolean; naReady: EventEmitter<any>; naMouseOut: EventEmitter<any>; naDragStart: EventEmitter<any>; naDragging: EventEmitter<any>; naDragEnd: EventEmitter<any>; naMoving: EventEmitter<any>; naMoveEnd: EventEmitter<any>; naMoveAlong: EventEmitter<any>; infoWindowComponent: QueryList<AmapInfoWindowComponent>; protected inited: boolean; protected subscription: Subscription; constructor(os: WithCreate<any>, binder: EventBinderService, amaps: AMapService, pixels: PixelService, icons: IconService, mlabels: MarkerLabelService, logger: LoggerService, ngZone: NgZone); ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterContentInit(): void; private updateInfoWindow; private updateInfoWindowPosition; getOptions(): AMapUISimpleMarker.Options<any>; /** * 获取已创建的 AMapUI 对象 */ get(): import("rxjs").Observable<any>; }