From c82247e9e4c5651f7df6ee277989752e5cc80f6d Mon Sep 17 00:00:00 2001
From: Glenn Vorhes <gavorhes@wisc.edu>
Date: Wed, 8 Mar 2017 18:24:09 -0600
Subject: [PATCH] add default options as {}

---
 src/layers/LayerBaseVectorGeoJson.ts | 2 +-
 src/layers/LayerBaseXyzTile.ts       | 2 +-
 src/layers/LayerEsriTile.ts          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/layers/LayerBaseVectorGeoJson.ts b/src/layers/LayerBaseVectorGeoJson.ts
index d3d5dc9..8059340 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 2674aea..1388e69 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 e44980a..df7ef5a 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 += '/';
         }
-- 
GitLab