@@ -88,43 +88,12 @@ export class CartoOnlineRasterTileLayer extends RasterTileLayerBase<com.carto.la
8888 }
8989}
9090
91- export class HillshadeRasterTileLayer extends RasterTileLayerCommon < com . akylas . carto . additions . AKHillshadeRasterTileLayer , HillshadeRasterTileLayerOptions > {
91+ export class HillshadeRasterTileLayer extends RasterTileLayerCommon < com . carto . layers . HillshadeRasterTileLayer , HillshadeRasterTileLayerOptions > {
9292 @nativeProperty heightScale : number ;
9393 @nativeProperty contrast : number ;
9494 @nativeProperty illuminationDirection : number ;
9595 @nativeColorProperty highlightColor : string | Color ;
9696 createNative ( options : HillshadeRasterTileLayerOptions ) {
97- if ( options . decoder ) {
98- return new com . akylas . carto . additions . AKHillshadeRasterTileLayer ( options . dataSource . getNative ( ) , options . decoder . getNative ( ) ) ;
99- } else {
100- return new com . akylas . carto . additions . AKHillshadeRasterTileLayer ( options . dataSource . getNative ( ) ) ;
101- }
102- }
103- public getElevation ( pos : MapPos ) : number {
104- return this . getNative ( ) . getElevation ( toNativeMapPos ( pos ) ) ;
105- }
106- public getElevations ( pos : MapPosVector | MapPos [ ] ) : IntVector {
107- return new IntVector ( this . getNative ( ) . getElevations ( mapPosVectorFromArgs ( pos ) ) ) ;
108- }
109-
110- public getElevationAsync ( pos : MapPos , callback : ( error : any , res : number ) => void ) {
111- this . getNative ( ) . getElevationCallback (
112- toNativeMapPos ( pos ) ,
113- new com . akylas . carto . additions . AKHillshadeRasterTileLayer . ElevationCallback ( {
114- onElevation ( err , res ) {
115- callback ( err , res as any ) ;
116- } ,
117- } )
118- ) ;
119- }
120- public getElevationsAsync ( pos : MapPosVector | MapPos [ ] , callback : ( error : any , res : IntVector ) => void ) {
121- this . getNative ( ) . getElevationsCallback (
122- mapPosVectorFromArgs ( pos ) ,
123- new com . akylas . carto . additions . AKHillshadeRasterTileLayer . ElevationsCallback ( {
124- onElevations ( err , res ) {
125- callback ( err , new IntVector ( res ) ) ;
126- } ,
127- } )
128- ) ;
97+ return new com . carto . layers . HillshadeRasterTileLayer ( options . dataSource . getNative ( ) ) ;
12998 }
13099}
0 commit comments