|
|
|
@ -10,9 +10,9 @@ class KedaBasic implements ISelf {
|
|
|
|
|
self: any; |
|
|
|
|
discriminator: string = "ISelf"; |
|
|
|
|
} |
|
|
|
|
const cityPosition: number[] = [121.469167918, 31.232262275]; //上海市 坐标
|
|
|
|
|
const beforCity: string = "上海市"; //当前城市
|
|
|
|
|
const cityCode: string = "310000"; //当前城市 行政编码
|
|
|
|
|
const cityPosition: number[] = [108.2854170, 22.8616262]; //广西壮族自治区 坐标
|
|
|
|
|
const beforCity: string = "广西壮族自治区"; //当前城市
|
|
|
|
|
const cityCode: string = "450000"; //当前城市 行政编码
|
|
|
|
|
|
|
|
|
|
export class KeDaMap extends KedaBasic implements IMap { |
|
|
|
|
public isLoadEnd:boolean = false |
|
|
|
@ -193,7 +193,7 @@ export class KeDaMap extends KedaBasic implements IMap {
|
|
|
|
|
} |
|
|
|
|
setCity(city: string) { |
|
|
|
|
let that = this |
|
|
|
|
if (city.includes("上海") && this.isLoadEnd) { |
|
|
|
|
if (city.includes("广西壮族自治区") && this.isLoadEnd) { |
|
|
|
|
that.self.flyTo({ |
|
|
|
|
zoom: 9, |
|
|
|
|
point: cityPosition |
|
|
|
@ -201,7 +201,7 @@ export class KeDaMap extends KedaBasic implements IMap {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
getCity(callback: Function) { |
|
|
|
|
let autoOptions = { city: "上海" } |
|
|
|
|
let autoOptions = { city: "广西壮族自治区" } |
|
|
|
|
return callback(autoOptions) |
|
|
|
|
} |
|
|
|
|
setZoom(zoom: number) { |
|
|
|
|