import TiledLayer from './TiledLayer' ; import LabelLayer from './LabelLayer' ; type Style = "Default" | "Satellite" ; export class AutonaviTiledLayer extends TiledLayer { private idx : number = 1 ; constructor ( style = "Default" ) { super ( style ) ; } getTileUrl ( level , row , column ) { if ( this . idx === undefined ) { this . idx = 1 ; } var url = "" ; if ( this . style === 'Satellite' ) { url = `//webst0${ this . idx }.is.autonavi.com/appmaptile?style=6&x=${ column }&y=${ row }&z=${ level }` ; } else { url = `//webst0${ this . idx }.is.autonavi.com/appmaptile?style=7&x=${ column }&y=${ row }&z=${ level }` ; } this . idx ++ ; if ( this . idx >= 5 ) { this . idx = 1 ; } return url ; } } ; export class AutonaviLabelLayer extends LabelLayer { private idx : number = 1 ; getTileUrl ( level , row , column ) { if ( this . idx === undefined ) { this . idx = 1 ; } var url = `//webst0${ this . idx }.is.autonavi.com/appmaptile?style=8&x=${ column }&y=${ row }&z=${ level }` ; this . idx ++ ; if ( this . idx >= 5 ) { this . idx = 1 ; } return url ; } } ;