1.4.5 • Published 6 months ago

@types/amap-js-api-scale v1.4.5

Weekly downloads
21
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/amap-js-api-scale

Summary

This package contains type definitions for amap-js-api-scale (https://lbs.amap.com/api/javascript-api/reference/map-control#AMap.Scale).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/amap-js-api-scale.

index.d.ts

// Type definitions for non-npm package amap-js-api-scale 1.4
// Project: https://lbs.amap.com/api/javascript-api/reference/map-control#AMap.Scale
// Definitions by: breeze9527 <https://github.com/breeze9527>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

/// <reference types="amap-js-api" />

declare namespace AMap {
    namespace Scale {
        interface EventMap {
            show: Event<'show'>;
            hide: Event<'hide'>;
        }
        type Position = 'LT' | 'RT' | 'LB' | 'RB';
        interface Options {
            /**
             * 控件停靠位置
             * LT:左上角;
             * RT:右上角;
             * LB:左下角;
             * RB:右下角;
             * 默认位置:LB
             */
            position?: Position | undefined;
            /**
             * 是否可见
             */
            visible?: boolean | undefined;
            /**
             * 相对于地图容器左上角的偏移量
             */
            offset?: Pixel | undefined;
        }
    }

    /**
     * 比例尺插件
     */
    class Scale extends EventEmitter {
        constructor(options?: Scale.Options);
        /**
         * 控件停靠位置
         */
        position: Scale.Position;
        /**
         * 相对于地图容器左上角的偏移量
         */
        offset: Pixel;
        /**
         * 是否可见
         */
        visible: boolean;
        /**
         * 显示比例尺
         */
        show(): void;
        /**
         * 隐藏比例尺
         */
        hide(): void;
    }
}

Additional Details

  • Last updated: Wed, 07 Jul 2021 21:44:11 GMT
  • Dependencies: @types/amap-js-api
  • Global values: AMap

Credits

These definitions were written by breeze9527.

1.4.5

6 months ago

1.4.4

7 months ago

1.4.3

8 months ago

1.4.2

3 years ago

1.4.1

4 years ago

1.4.0

5 years ago