diff --git a/src/layers/LayerBaseVectorGeoJson.ts b/src/layers/LayerBaseVectorGeoJson.ts index d3d5dc9e934d93bc733c4734a978482c89291f3f..80593408b881423636e15d642117053ae8bf035c 100644 --- a/src/layers/LayerBaseVectorGeoJson.ts +++ b/src/layers/LayerBaseVectorGeoJson.ts @@ -53,7 +53,7 @@ export class LayerBaseVectorGeoJson extends LayerBaseVector { * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages */ - constructor(url, options?: LayerBaseVectorGeoJsonOptions) { + constructor(url, options: LayerBaseVectorGeoJsonOptions = {}) { url = typeof url == 'string' ? url : ''; super(url, options); diff --git a/src/layers/LayerBaseXyzTile.ts b/src/layers/LayerBaseXyzTile.ts index 2674aea42c8ae141bdf6b496e7a51f88d4bfe1f0..1388e699f948b49dc149d30a65ca81ffcc279c5c 100644 --- a/src/layers/LayerBaseXyzTile.ts +++ b/src/layers/LayerBaseXyzTile.ts @@ -32,7 +32,7 @@ export class LayerBaseXyzTile extends LayerBase { * @param {boolean} [options.legendContent] additional content to add to the legend * @param {boolean} [options.useEsriStyle=false] if the map service style should be used */ - constructor(url: string, options: LayerBaseOptions) { + constructor(url: string, options: LayerBaseOptions = {}) { super(url, options); this._source = new ol.source.XYZ({url: this.url == '' ? undefined : this.url}); diff --git a/src/layers/LayerEsriTile.ts b/src/layers/LayerEsriTile.ts index e44980a2c6a1576d0b36f0221dbf162a479474cc..df7ef5a5270420ae7c710be1334dcd22750a8f36 100644 --- a/src/layers/LayerEsriTile.ts +++ b/src/layers/LayerEsriTile.ts @@ -38,7 +38,7 @@ export class LayerEsriTile extends LayerBaseXyzTile { * @param {boolean} [options.legendContent] additional content to add to the legend * @param {boolean} [options.useEsriStyle=false] if the map service style should be used */ - constructor(url: string, options: LayerEsriTileOptions) { + constructor(url: string, options: LayerEsriTileOptions = {}) { if (url.search(/\/$/) == -1) { url += '/'; }