@@ -403,6 +403,9 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo }) {
403403 case 'TILE' :
404404 this . _createDynamicTiledLayer ( layerInfo , addedCallback ) ;
405405 break ;
406+ case 'ZXY_TILE' :
407+ this . _createZXYLayer ( layerInfo , addedCallback ) ;
408+ break ;
406409 case 'CLOUD' :
407410 case 'XYZ' :
408411 url = mapUrls [ layerInfo . layerType ]
@@ -442,6 +445,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo }) {
442445 layer . minzoom = Math . max ( this . _transformScaleToZoom ( minScale , crs ) , 0 ) ;
443446 layer . maxzoom = Math . min ( 24 , this . _transformScaleToZoom ( maxScale , crs ) + 0.0000001 ) ;
444447 }
448+ console . log ( '_initOverlayLayers' )
445449
446450 if ( type === 'tile' ) {
447451 if ( layer . autoUpdateTime ) {
@@ -705,6 +709,14 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo }) {
705709 addedCallback && addedCallback ( ) ;
706710 }
707711
712+ _createZXYLayer ( layerInfo , addedCallback ) {
713+ const { url, subdomains, layerID, name, visible } = layerInfo ;
714+ const urls = ( subdomains && subdomains . length ) ? subdomains . map ( item => url . replace ( '{s}' , item ) ) : [ url ] ;
715+ const layerId = layerID || name ;
716+ this . _addBaselayer ( { url : urls , layerID : layerId , visibility : visible } ) ;
717+ addedCallback && addedCallback ( ) ;
718+ }
719+
708720 _createDynamicTiledLayer ( layerInfo , addedCallback ) {
709721 const url = layerInfo . url ;
710722 const layerId = layerInfo . layerID || layerInfo . name ;
0 commit comments