|
|
@ -39,7 +39,7 @@ export class GaoDeMap extends GaodeBasic implements IMap { |
|
|
|
getBounds() { |
|
|
|
getBounds() { |
|
|
|
return this.self.getBounds() |
|
|
|
return this.self.getBounds() |
|
|
|
} |
|
|
|
} |
|
|
|
add(obj: IMarker|any) { |
|
|
|
add(obj: IMarker | any) { |
|
|
|
return this.self.add(obj.self) |
|
|
|
return this.self.add(obj.self) |
|
|
|
} |
|
|
|
} |
|
|
|
remove(obj: any) { |
|
|
|
remove(obj: any) { |
|
|
@ -75,7 +75,7 @@ export class GaoDePixel extends GaodeBasic implements IPixel { |
|
|
|
export class GaoDeMarker extends GaodeBasic implements IMarker { |
|
|
|
export class GaoDeMarker extends GaodeBasic implements IMarker { |
|
|
|
constructor(options: IMarkOptions) { |
|
|
|
constructor(options: IMarkOptions) { |
|
|
|
super(); |
|
|
|
super(); |
|
|
|
let conf = MapTools.InstanceConvert(options); |
|
|
|
let conf = MapTools.ExplicitConvert(options); |
|
|
|
this.self = new AMap.Marker(conf); |
|
|
|
this.self = new AMap.Marker(conf); |
|
|
|
this._position = this.self._position; |
|
|
|
this._position = this.self._position; |
|
|
|
} |
|
|
|
} |
|
|
@ -103,13 +103,13 @@ export class GaoDeMarker extends GaodeBasic implements IMarker { |
|
|
|
export class GaoDeMarkerCluster extends GaodeBasic implements IMarkerCluster { |
|
|
|
export class GaoDeMarkerCluster extends GaodeBasic implements IMarkerCluster { |
|
|
|
constructor(map: IMap, list: Object[], options: any) { |
|
|
|
constructor(map: IMap, list: Object[], options: any) { |
|
|
|
super(); |
|
|
|
super(); |
|
|
|
let conf = MapTools.InstanceConvert(options); |
|
|
|
let conf = MapTools.ExplicitConvert(options); |
|
|
|
this.self = new AMap.MarkerCluster(map.self, list, conf) |
|
|
|
this.self = new AMap.MarkerCluster(map.self, list, conf) |
|
|
|
} |
|
|
|
} |
|
|
|
on(eventName: string, callback: Function): void { |
|
|
|
on(eventName: string, callback: Function): void { |
|
|
|
this.self.on(eventName, callback); |
|
|
|
this.self.on(eventName, callback); |
|
|
|
} |
|
|
|
} |
|
|
|
setData(list:any[]) { |
|
|
|
setData(list: any[]) { |
|
|
|
this.self.setData(list) |
|
|
|
this.self.setData(list) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -141,9 +141,9 @@ export class GaodeIcon extends GaodeBasic implements IIcon { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export class GaodeSize extends GaodeBasic implements ISize { |
|
|
|
export class GaodeSize extends GaodeBasic implements ISize { |
|
|
|
constructor(x:number, y:number) { |
|
|
|
constructor(x: number, y: number) { |
|
|
|
super(); |
|
|
|
super(); |
|
|
|
this.self = new AMap.Size(x,y); |
|
|
|
this.self = new AMap.Size(x, y); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -170,21 +170,21 @@ export class GaodeDriving extends GaodeBasic implements IDriving { |
|
|
|
clear() { |
|
|
|
clear() { |
|
|
|
this.self.clear() |
|
|
|
this.self.clear() |
|
|
|
} |
|
|
|
} |
|
|
|
search(x:any, y:any, callback:Function) { |
|
|
|
search(x: any, y: any, callback: Function) { |
|
|
|
this.self.search(x.self,y.self,callback) |
|
|
|
this.self.search(x.self, y.self, callback) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export class GaodeAutocomplete extends GaodeBasic implements IAutocomplete { |
|
|
|
export class GaodeAutocomplete extends GaodeBasic implements IAutocomplete { |
|
|
|
constructor(city:Object) { |
|
|
|
constructor(city: Object) { |
|
|
|
super(); |
|
|
|
super(); |
|
|
|
this.self = new AMap.Autocomplete(city) |
|
|
|
this.self = new AMap.Autocomplete(city) |
|
|
|
} |
|
|
|
} |
|
|
|
on(eventName: string, callback: Function) { |
|
|
|
on(eventName: string, callback: Function) { |
|
|
|
this.self.on(eventName,callback) |
|
|
|
this.self.on(eventName, callback) |
|
|
|
} |
|
|
|
} |
|
|
|
search(address: string, callback: Function) { |
|
|
|
search(address: string, callback: Function) { |
|
|
|
this.self.search(address,callback) |
|
|
|
this.self.search(address, callback) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -204,7 +204,7 @@ export class GaodeMouseTool extends GaodeBasic implements IMouseTool { |
|
|
|
this.self = new AMap.MouseTool(map.self); |
|
|
|
this.self = new AMap.MouseTool(map.self); |
|
|
|
} |
|
|
|
} |
|
|
|
rule(options: any) { |
|
|
|
rule(options: any) { |
|
|
|
let conf = MapTools.InstanceConvert(options); |
|
|
|
let conf = MapTools.ExplicitConvert(options); |
|
|
|
return this.self.rule(conf) |
|
|
|
return this.self.rule(conf) |
|
|
|
} |
|
|
|
} |
|
|
|
measureArea(options: any) { |
|
|
|
measureArea(options: any) { |
|
|
@ -225,7 +225,7 @@ export class GaodeInfoWindow extends GaodeBasic implements IInfoWindow { |
|
|
|
return this.self.open(map.self) |
|
|
|
return this.self.open(map.self) |
|
|
|
} |
|
|
|
} |
|
|
|
listen(html: any, event: string, callback: Function) { |
|
|
|
listen(html: any, event: string, callback: Function) { |
|
|
|
return this.self.listen(html,event,callback) |
|
|
|
return this.self.listen(html, event, callback) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|