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]

79 lines (78 loc) 2.25 kB
/// <reference types="@types/amap-js-api" /> import { NgZone } from '@angular/core'; import { AMapService } from '../../shared/amap.service'; import { PluginLoaderService } from '../../shared/plugin-loader.service'; import { LoggerService } from '../../shared/logger/logger.service'; import { Getter } from '../../base/interfaces'; export declare namespace AMapToolBar { interface Options { /** * 相对于地图容器左上角的偏移量 */ offset?: AMap.Pixel; /** * 控件停靠位置 * LT:左上角; * RT:右上角; * LB:左下角; * RB:右下角; */ position?: Position; /** * 标尺键盘是否可见 */ ruler?: boolean; /** * 定位失败后,是否开启IP定位 */ noIpLocate?: boolean; /** * 是否显示定位按钮 */ locate?: boolean; /** * 是否使用精简模式 */ liteStyle?: boolean; /** * 方向键盘是否可见 */ direction?: boolean; /** * 是否自动定位,即地图初始化加载完成后,是否自动定位的用户所在地,仅在支持HTML5的浏览器中有效 */ autoPosition?: boolean; /** * 自定义定位图标,值为Marker对象 */ locationMarker?: AMap.Marker; /** * 是否使用高德定位sdk用来辅助优化定位效果 */ useNative?: boolean; timeout?: number; } type Position = 'LT' | 'RT' | 'LB' | 'RB'; } export declare class AmapToolBarService implements Getter<any> { private amaps; private plugin; private logger; private ngZone; private toolBar; private toolBar$; constructor(amaps: AMapService, plugin: PluginLoaderService, logger: LoggerService, ngZone: NgZone); /** * 获取工具条 */ get(): import("rxjs").Observable<any>; /** * 创建工具条 AMap.ToolBar * @param options 选项 */ create(options: AMapToolBar.Options): import("rxjs").Observable<any>; /** * 销毁工具条 */ destroy(): void; }