diff --git a/types/amap-js-sdk/amap-js-sdk-tests.ts b/types/amap-js-sdk/amap-js-sdk-tests.ts index 9354bed23a..f09bca3760 100644 --- a/types/amap-js-sdk/amap-js-sdk-tests.ts +++ b/types/amap-js-sdk/amap-js-sdk-tests.ts @@ -1,4 +1,22 @@ -const map = new AMap.Map('id', { +const aMap = new AMap.Map('id', { resizeEnable: true, animateEnable: true }); + +aMap.setCenter(new AMap.LngLat(0, 0)); + +AMap.plugin(['someplugin'], () => { + console.log('plugin loaded'); +}); + +AMap.convertFrom([116.3, 39.9], 'gps', (status, result) => { + if (result.info === 'ok') { + const _ = result.locations; + } +}); + +new AMap.Marker({ + map: aMap, + title: '', + position: new AMap.LngLat(0, 0), +}); diff --git a/types/amap-js-sdk/index.d.ts b/types/amap-js-sdk/index.d.ts index e6b4311dc3..c77cca2732 100644 --- a/types/amap-js-sdk/index.d.ts +++ b/types/amap-js-sdk/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for amap-js-sdk x.x +// Type definitions for amap-js-sdk 1.4.12 // Project: http://lbs.amap.com/api/javascript-api/summary/ // Definitions by: Bian Zhongjie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -889,7 +889,7 @@ declare namespace AMap { /** * 坐标转换 */ - function convertFrom(lnglat: LngLat | LngLat[], type: string, result: (status: string, result: ConvertorResult) => void): void; + function convertFrom(lnglat: LngLat | LngLat[] | [number, number], type: string, result: (status: string, result: ConvertorResult) => void): void; interface CitySearchResult { city: string; diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index 6283caae62..70f6f41c0a 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for wx-js-sdk 1.2 +// Type definitions for wx-js-sdk 1.4 // Project: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115 // Definitions by: Bian Zhongjie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped