mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
add some tests for amap
This commit is contained in:
parent
97b1f780d1
commit
aa1bbcfd3a
@ -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),
|
||||
});
|
||||
|
||||
4
types/amap-js-sdk/index.d.ts
vendored
4
types/amap-js-sdk/index.d.ts
vendored
@ -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 <https://github.com/agasbzj>
|
||||
// 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;
|
||||
|
||||
2
types/wx-js-sdk-dt/index.d.ts
vendored
2
types/wx-js-sdk-dt/index.d.ts
vendored
@ -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 <https://github.com/agasbzj>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
Loading…
Reference in New Issue
Block a user