上海预案管理平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
790 B

import { IMap, IMapOptions, IMarker, IPixel } from './map'
declare var AMap: any;
export class GaoDeMap implements IMap {
self: any;//AMap.Map
constructor(container: string, options: IMapOptions) {
this.self = new AMap.Map(container, options);
}
getCenter() {
return this.self.getCenter();
}
getZoom() {
return this.self.getZoom();
}
on(eventName: string, callback: Function): void {
this.self.on(eventName, callback);
}
}
export class GaoDePixel implements IPixel {
self: any;
constructor(x: number, y: number) {
this.self = new AMap.Pixel(x, y);
}
}
export class GaoDeMarker implements IMarker {
self: any;
constructor(options: any) {
this.self = new AMap.Marker(options);
}
}