import { IMap, IMapOptions, IMarker, IPixel } from './map' declare var KMap: any; export class KeDaMap implements IMap { self: any; constructor(container: string, options: IMapOptions) { let opt = Object.assign({}, { containerId: container }, options) as any; opt.configUrl = ""; this.self = new KMap(opt); } add(obj: any) { throw new Error('Method not implemented.'); } remove(obj: any) { throw new Error('Method not implemented.'); } setCity(city: string) { throw new Error('Method not implemented.'); } setZoom(zoom) { throw new Error('Method not implemented.'); } setCenter([x,y]) { throw new Error('Method not implemented.'); } getZoom() { throw new Error('Method not implemented.'); } getCenter() { throw new Error('Method not implemented.'); } on(eventName: string, callback: Function): void { let eventMapProfile = { complete: "load", click: "click", rightclick: "contextmenu" }; this.self.addEventOnMap({ event: eventMapProfile[eventName], handler: callback }); } } export class KeDaPixel implements IPixel { self: any; constructor(x: number, y: number) { this.self = [x, y]; } } export class KeDaMarker implements IMarker { self: any; constructor(options: any) { let d = { offset: options.offset, element: options.content }; this.self = d; } }