Skip to content
Snippets Groups Projects
Commit c82247e9 authored by Glenn Vorhes's avatar Glenn Vorhes
Browse files

add default options as {}

parent efa45616
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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});
......
......@@ -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 += '/';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment