diff --git a/dist/layers/LayerBaseVectorGeoJson.js b/dist/layers/LayerBaseVectorGeoJson.js
index 90c9d7e29e5031af7e93be76f3320b6b29ea0bab..609a2e9ed9177d272880801e71bf37c958554020 100644
--- a/dist/layers/LayerBaseVectorGeoJson.js
+++ b/dist/layers/LayerBaseVectorGeoJson.js
@@ -72,7 +72,8 @@ var LayerBaseVectorGeoJson = (function (_super) {
      * @param {object} featureCollection - as geojson object
      */
     LayerBaseVectorGeoJson.prototype.addFeatures = function (featureCollection) {
-        this.source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection));
+        this.source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, { dataProjection: this._transform.dataProjection,
+            featureProjection: this._transform.featureProjection }));
     };
     /**
      * trigger load features
diff --git a/dist/layers/LayerBaseVectorGeoJson.js.map b/dist/layers/LayerBaseVectorGeoJson.js.map
index 710992ff0b1549a79f8653953fe505a35bf7e937..4fcad64d340636cb2eadd9d6810b9b435031814d 100644
--- a/dist/layers/LayerBaseVectorGeoJson.js.map
+++ b/dist/layers/LayerBaseVectorGeoJson.js.map
@@ -1 +1 @@
-{"version":3,"file":"LayerBaseVectorGeoJson.js","sourceRoot":"","sources":["../../src/layers/LayerBaseVectorGeoJson.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;AAEH,qDAA0E;AAC1E,2CAAsC;AACtC,8BAAiC;AACjC,0BAA6B;AAE7B,+CAAiD;AACjD,wDAAkD;AAElD,IAAI,EAAE,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;AAa3B;;;GAGG;AACH;IAA4C,0CAAe;IAIvD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,gCAAY,GAAY,EAAE,OAA2C;QAA3C,wBAAA,EAAA,YAA2C;QAArE,iBAaC;QAZG,GAAG,GAAG,OAAO,GAAG,IAAI,QAAQ,GAAG,GAAG,GAAG,EAAE,CAAC;QACxC,QAAA,kBAAM,GAAG,EAAE,OAAO,CAAC,SAAC;Q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AC;QACzB,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,EACvD,EAAC,iBAAiB,EAAE,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,EAAC,CAAC,CAAC,CAAC;IACjH,CAAC;IACL,6BAAC;AAAD,CAAC,AA3FD,CAA4C,iCAAe,GA2F1D;AA3FY,wDAAsB;AA6FnC,EAAE,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;AACnD,kBAAe,sBAAsB,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {MapMoveCls} from \"../olHelpers/mapMoveCls\";\r\nimport * as proj from '../olHelpers/projections';\r\nimport {proj3857} from \"../olHelpers/projections\";\r\n\r\nlet nm = provide('layers');\r\n\r\nexport interface crsTransform {\r\n    dataProjection?: ol.proj.Projection;\r\n    featureProjection?: ol.proj.Projection;\r\n}\r\n\r\n\r\nexport interface LayerBaseVectorGeoJsonOptions extends LayerBaseVectorOptions {\r\n    transform?: crsTransform;\r\n    mapMoveObj?: MapMoveCls;\r\n}\r\n\r\n/**\r\n * The Vector GeoJson Layer\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorGeoJson extends LayerBaseVector {\r\n    _geoJsonFormat: ol.format.GeoJSON;\r\n    _transform: crsTransform;\r\n\r\n    /**\r\n     * @param {string|null} url - resource url, set to '' to make blank layer\r\n     * @param {object} options - config\r\n     * @param {string} [options.id] - layer id\r\n     * @param {string} [options.name=Unnamed Layer] - layer name\r\n     * @param {number} [options.opacity=1] - opacity\r\n     * @param {boolean} [options.visible=true] - default visible\r\n     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n     * @param {number} [options.zIndex=0] the z index for the layer\r\n     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n     *\r\n     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n     * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n     *\r\n     * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n     * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n     * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n     * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n     */\r\n    constructor(url?: string, options: LayerBaseVectorGeoJsonOptions = {}) {\r\n        url = typeof url == 'string' ? url : '';\r\n        super(url, options);\r\n\r\n        this._geoJsonFormat = new ol.format.GeoJSON();\r\n\r\n        this._transform = options.transform || {};\r\n        this._transform.dataProjection = this._transform.dataProjection || proj.proj4326;\r\n        this._transform.featureProjection = this._transform.featureProjection || proj3857;\r\n\r\n        if (this.autoLoad || this.visible) {\r\n            this._load();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * add feature collection\r\n     * @param {object} featureCollection - as geojson object\r\n     */\r\n    addFeatures(featureCollection: any) {\r\n\r\n        this.source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection));\r\n    }\r\n\r\n\r\n    /**\r\n     * trigger load features\r\n     * @protected\r\n     * @returns {boolean} if already loaded\r\n     */\r\n    _load() {\r\n\r\n        if (super._load()) {\r\n            return true;\r\n        }\r\n\r\n        $.get(this._url,\r\n            this._params,\r\n            (d) => {\r\n                this.addFeatures(d);\r\n                this.loadCallback(this);\r\n            }, 'json').fail(\r\n            function () {\r\n                this._loaded = false;\r\n            }\r\n        );\r\n\r\n        return false;\r\n    }\r\n\r\n    /**\r\n     * callback function on map move\r\n     * @param {object} d the json response\r\n     * @override\r\n     */\r\n    mapMoveCallback(d) {\r\n        super.mapMoveCallback(d);\r\n        this._source.addFeatures(this._geoJsonFormat.readFeatures(d,\r\n            {featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection}));\r\n    }\r\n}\r\n\r\nnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nexport default LayerBaseVectorGeoJson;\r\n"]}
\ No newline at end of file
+{"version":3,"file":"LayerBaseVectorGeoJson.js","sourceRoot":"","sources":["../../src/layers/LayerBaseVectorGeoJson.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;AAEH,qDAA0E;AAC1E,2CAAsC;AACtC,8BAAiC;AACjC,0BAA6B;AAE7B,+CAAiD;AACjD,wDAAkD;AAElD,IAAI,EAAE,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;AAa3B;;;GAGG;AACH;IAA4C,0CAAe;IAIvD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,gCAAY,GAAY,EAAE,OAA2C;QAA3C,wBAAA,EAAA,YAA2C;QAArE,iBAaC;QAZG,GAAG,GAAG,OAAO,GAAG,IAAI,QAAQ,GAAG,GAAG,GAAG,EAAE,CAAC;QACxC,QAAA,kBAAM,GAAG,EAAE,OAAO,CAAC,SAAC;QAEpB,KAAI,CAAC,cAAc,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAE9C,KAAI,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;QAC1C,KAAI,CAAC,UAAU,CAAC,c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AAC,YAAY,CAAC,CAAC,EACvD,EAAC,iBAAiB,EAAE,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,EAAC,CAAC,CAAC,CAAC;IACjH,CAAC;IACL,6BAAC;AAAD,CAAC,AA/FD,CAA4C,iCAAe,GA+F1D;AA/FY,wDAAsB;AAiGnC,EAAE,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;AACnD,kBAAe,sBAAsB,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {MapMoveCls} from \"../olHelpers/mapMoveCls\";\r\nimport * as proj from '../olHelpers/projections';\r\nimport {proj3857} from \"../olHelpers/projections\";\r\n\r\nlet nm = provide('layers');\r\n\r\nexport interface crsTransform {\r\n    dataProjection?: ol.proj.Projection;\r\n    featureProjection?: ol.proj.Projection;\r\n}\r\n\r\n\r\nexport interface LayerBaseVectorGeoJsonOptions extends LayerBaseVectorOptions {\r\n    transform?: crsTransform;\r\n    mapMoveObj?: MapMoveCls;\r\n}\r\n\r\n/**\r\n * The Vector GeoJson Layer\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorGeoJson extends LayerBaseVector {\r\n    _geoJsonFormat: ol.format.GeoJSON;\r\n    _transform: crsTransform;\r\n\r\n    /**\r\n     * @param {string|null} url - resource url, set to '' to make blank layer\r\n     * @param {object} options - config\r\n     * @param {string} [options.id] - layer id\r\n     * @param {string} [options.name=Unnamed Layer] - layer name\r\n     * @param {number} [options.opacity=1] - opacity\r\n     * @param {boolean} [options.visible=true] - default visible\r\n     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n     * @param {number} [options.zIndex=0] the z index for the layer\r\n     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n     *\r\n     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n     * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n     *\r\n     * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n     * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n     * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n     * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n     */\r\n    constructor(url?: string, options: LayerBaseVectorGeoJsonOptions = {}) {\r\n        url = typeof url == 'string' ? url : '';\r\n        super(url, options);\r\n\r\n        this._geoJsonFormat = new ol.format.GeoJSON();\r\n\r\n        this._transform = options.transform || {};\r\n        this._transform.dataProjection = this._transform.dataProjection || proj.proj4326;\r\n        this._transform.featureProjection = this._transform.featureProjection || proj3857;\r\n\r\n        if (this.autoLoad || this.visible) {\r\n            this._load();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * add feature collection\r\n     * @param {object} featureCollection - as geojson object\r\n     */\r\n    addFeatures(featureCollection: any) {\r\n        this.source.addFeatures(\r\n            this._geoJsonFormat.readFeatures(featureCollection,\r\n                {dataProjection: this._transform.dataProjection,\r\n                    featureProjection: this._transform.featureProjection}\r\n                )\r\n        );\r\n    }\r\n\r\n\r\n    /**\r\n     * trigger load features\r\n     * @protected\r\n     * @returns {boolean} if already loaded\r\n     */\r\n    _load() {\r\n\r\n        if (super._load()) {\r\n            return true;\r\n        }\r\n\r\n        $.get(this._url,\r\n            this._params,\r\n            (d) => {\r\n                this.addFeatures(d);\r\n                this.loadCallback(this);\r\n            }, 'json').fail(\r\n            function () {\r\n                this._loaded = false;\r\n            }\r\n        );\r\n\r\n        return false;\r\n    }\r\n\r\n    /**\r\n     * callback function on map move\r\n     * @param {object} d the json response\r\n     * @override\r\n     */\r\n    mapMoveCallback(d) {\r\n        super.mapMoveCallback(d);\r\n        this._source.addFeatures(this._geoJsonFormat.readFeatures(d,\r\n            {featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection}));\r\n    }\r\n}\r\n\r\nnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nexport default LayerBaseVectorGeoJson;\r\n"]}
\ No newline at end of file
diff --git a/dist/layers/LayerItsInventory.js b/dist/layers/LayerItsInventory.js
index 4d3184674cda4461aa6266d0455c5092f2fb5cf7..de04ee73b0afe04f196ade4168f73749607e8f39 100644
--- a/dist/layers/LayerItsInventory.js
+++ b/dist/layers/LayerItsInventory.js
@@ -18,6 +18,7 @@ var mapPopup_1 = require("../olHelpers/mapPopup");
 var provide_1 = require("../util/provide");
 var ol = require("custom-ol");
 var $ = require("jquery");
+var projections_1 = require("../olHelpers/projections");
 var nm = provide_1.default('layers');
 function checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {
     "use strict";
@@ -260,6 +261,7 @@ var LayerItsInventory = (function (_super) {
         if (typeof options.itsType !== 'string') {
             throw 'its type must be defined';
         }
+        options.transform = { dataProjection: projections_1.proj4326, featureProjection: projections_1.proj3857 };
         var addToLegend = '';
         // define a style with the helper function if it is not explicitly defined
         if (typeof options.style == 'undefined') {
diff --git a/dist/layers/LayerItsInventory.js.map b/dist/layers/LayerItsInventory.js.map
index 8c61400df4c54fe02c9b30c0ae9d6aa4bb75bc52..19c4aa0b76e6345125968dc00b32d0ea156a6194 100644
--- a/dist/layers/LayerItsInventory.js.map
+++ b/dist/layers/LayerItsInventory.js.map
@@ -1 +1 @@
-{"version":3,"file":"LayerItsInventory.js","sourceRoot":"","sources":["../../src/layers/LayerItsInventory.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;AAEH,mEAA8D;AAC9D,kDAA6C;AAC7C,2CAAsC;AACtC,8BAAiC;AACjC,0BAA6B;AAE7B,IAAI,EAAE,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;AAG3B,0BAA0B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa;IACzE,YAAY,CAAC;IAEb,sDAAsD;IACtD,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,EAAE,CAAC,CAAC,OAAO,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC;QAC7B,WAAW,EAAE,CAAC;IAClB,CAAC;IAED,EAAE,CAAC,CAAC,OAAO,YAAY,IAAI,QAAQ,CAAC,CAAC,CAAC;QAClC,YAAY,CAAC,KAAK,GAAG,OAAO,YAAY,CAAC,KAAK,IAAI,QAAQ,GAAG,YAAY,CAAC,KAAK,GAAG,CAAC,CAAC;QACpF,YAAY,CAAC,KAAK,GAAG,OAAO,YAAY,CAAC,KAAK,IAAI,QAAQ,GAAG,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;QACxF,WAAW,EAAE,CAAC;IAClB,CAAC;IAED,EAAE,CAAC,CAAC,OAAO,aAAa,IAAI,QAAQ,CAAC,CAAC,CAAC;QACnC,aAAa,CAAC,WAAW,GAAG,aAAa,CAAC,WAAW,IAAI,OAAO,CAAC;QAEjE,EAAE,CAAC,CAAC,OAAO,aAAa,CAAC,SAAS,IAAI,WAAW,CAAC,CAAC,CAAC;YAChD,aAAa,CAAC,SAAS,GAAG,EAAE,CAAC;QACjC,CAAC;QAED,WAAW,EAAE,CAAC;IAClB,CAAC;IAED,EAAE,CAAC,CAAC,OAAO,aAAa,IAAI,QAAQ,CAAC,CAAC,CAAC;QACnC,aAAa,CA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AAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACzD,IAAI,qBAAqB,GAAG,UAAU,CAAC,cAAc,EAAE,CAAC;QAExD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EACvB;YACI,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;YAC1B,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC;YAC3B,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;YAC1B,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC;SAC9B,CAAC,CAAC;IACX,CAAC;IACL,wBAAC;AAAD,CAAC,AA5GD,CAAgC,gCAAsB,GA4GrD;AAED,EAAE,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AACzC,kBAAe,iBAAiB,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\n\r\nimport LayerBaseVectorGeoJson from './LayerBaseVectorGeoJson';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('layers');\r\n\r\n\r\nfunction checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n    \"use strict\";\r\n\r\n    //make sure one and only one configuration is defined;\r\n    let configCount = 0;\r\n    if (typeof itsIcon == 'string') {\r\n        configCount++;\r\n    }\r\n\r\n    if (typeof itsLineStyle == 'object') {\r\n        itsLineStyle.width = typeof itsLineStyle.width == 'number' ? itsLineStyle.width : 5;\r\n        itsLineStyle.color = typeof itsLineStyle.color == 'string' ? itsLineStyle.color : 'red';\r\n        configCount++;\r\n    }\r\n\r\n    if (typeof itsIconConfig == 'object') {\r\n        itsIconConfig.defaultName = itsIconConfig.defaultName || 'Other';\r\n\r\n        if (typeof itsIconConfig.iconArray == 'undefined') {\r\n            itsIconConfig.iconArray = [];\r\n        }\r\n\r\n        configCount++;\r\n    }\r\n\r\n    if (typeof itsLineConfig == 'object') {\r\n        itsLineConfig.defaultName = itsLineConfig.defaultName || 'Other';\r\n        itsLineConfig.defaultWidth = itsLineConfig.defaultWidth || 5;\r\n        itsLineConfig.defaultColor = itsLineConfig.defaultColor || 'red';\r\n\r\n\r\n        if (typeof itsLineConfig.lineArray == 'undefined') {\r\n            itsLineConfig.lineArray = [];\r\n        }\r\n\r\n        // set the width if not defined\r\n        for (let i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n            if (itsLineConfig.lineArray[i].length == 3) {\r\n                itsLineConfig.lineArray[i].push(5);\r\n            }\r\n        }\r\n\r\n        configCount++;\r\n    }\r\n\r\n    if (configCount > 1) {\r\n        throw 'Only one style config can be defined';\r\n    }\r\n}\r\n\r\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [itsLineStyle=undefined] A single line style\r\n * @param {string} itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n * @returns {*} undefined, style, or style function\r\n */\r\nfunction defineStyle(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) : ol.style.Style|Array<ol.style.Style>|ol.StyleFunction{\r\n    \"use strict\";\r\n    checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\r\n    let _iconUrlRoot = 'http://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\r\n    if (itsIcon) {\r\n        return new ol.style.Style({\r\n            image: new ol.style.Icon(\r\n                {\r\n                    src: _iconUrlRoot + itsIcon,\r\n                    crossOrigin: 'anonymous'\r\n                }\r\n            )\r\n        });\r\n    } else if (itsLineStyle) {\r\n        return new ol.style.Style({\r\n            stroke: new ol.style.Stroke({\r\n                color: itsLineStyle.color,\r\n                width: itsLineStyle.width\r\n            })\r\n        });\r\n    } else if (itsIconConfig) {\r\n        return function (feature: ol.Feature) {\r\n            let symbolProp = feature.getProperties()[itsIconConfig.prop];\r\n            let iconUrl = _iconUrlRoot + itsIconConfig.defaultIcon;\r\n\r\n            for (let i = 0; i < itsIconConfig.iconArray.length; i++) {\r\n                let thisProp = itsIconConfig.iconArray[i];\r\n\r\n                if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n                    iconUrl = _iconUrlRoot + thisProp[2];\r\n                    break;\r\n                }\r\n            }\r\n\r\n            return [new ol.style.Style({\r\n                image: new ol.style.Icon(\r\n                    {\r\n                        src: iconUrl,\r\n                        crossOrigin: 'anonymous'\r\n                    }\r\n                )\r\n            })];\r\n        };\r\n    } else if (itsLineConfig) {\r\n        return function (feature: ol.Feature) {\r\n            let symbolProp = feature.getProperties()[itsLineConfig.prop];\r\n            let colr = itsLineConfig.defaultColor || 'red';\r\n            let width = itsLineConfig.defaultWidth || 5;\r\n\r\n            for (let i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n                let thisProp = itsLineConfig.lineArray[i];\r\n\r\n                if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n                    colr = thisProp[2];\r\n                    width = thisProp[3];\r\n                    break;\r\n                }\r\n            }\r\n\r\n            return [new ol.style.Style({\r\n                stroke: new ol.style.Stroke({\r\n                    color: colr,\r\n                    width: width\r\n                })\r\n            })];\r\n        };\r\n    } else {\r\n        return undefined;\r\n    }\r\n}\r\n\r\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [itsLineStyle=undefined] A single line style\r\n * @param {string} itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n * @returns {string} html to be added to the legend\r\n */\r\nfunction defineLegend(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n    \"use strict\";\r\n\r\n    let iconHeight = 17;\r\n\r\n    checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\r\n    let _iconUrlRoot = 'http://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\r\n    if (itsIcon) {\r\n        return `<img src=\"${_iconUrlRoot + itsIcon}\" class=\"legend-layer-icon\" height=\"${iconHeight}\">`;\r\n    } else if (itsLineStyle) {\r\n        return `<hr style=\"height: ${itsLineStyle.width}px; background-color: ${itsLineStyle.color}\">`;\r\n    } else if (itsIconConfig) {\r\n        let outHtml = '';\r\n        outHtml += '<ul>';\r\n\r\n        for (let a of itsIconConfig.iconArray) {\r\n            outHtml += `<li><span class=\"legend-layer-subitem\">${a[1]}</span><img src=\"${_iconUrlRoot + a[2]}\" class=\"legend-layer-icon\" height=\"${iconHeight}\">`;\r\n        }\r\n        outHtml += `<li><span class=\"legend-layer-subitem\">${itsIconConfig.defaultName}</span>` +\r\n            `<img src=\"${_iconUrlRoot + itsIconConfig.defaultIcon}\" class=\"legend-layer-icon\" height=\"${iconHeight}\"></li>`;\r\n        outHtml += '</ul>';\r\n\r\n        return outHtml;\r\n    } else if (itsLineConfig) {\r\n        let outHtml = '';\r\n        outHtml += '<ul>';\r\n        for (let ls of itsLineConfig.lineArray) {\r\n            outHtml += `<li><span class=\"legend-layer-subitem\">${ls[1]}</span>` +\r\n                `<hr style=\"height: ${ls[3]}px; background-color: ${ls[2]}\">`;\r\n        }\r\n        outHtml += `<li><span class=\"legend-layer-subitem\">${itsLineConfig.defaultName}</span>` +\r\n            `<hr style=\"height: ${itsLineConfig.defaultWidth}px; background-color: ${itsLineConfig.defaultColor}\"></li>`;\r\n        outHtml += '</ul>';\r\n\r\n        return outHtml;\r\n    } else {\r\n        return '';\r\n    }\r\n}\r\n\r\n/**\r\n * Its Layer class\r\n * @augments LayerBaseVectorGeoJson\r\n */\r\nclass LayerItsInventory extends LayerBaseVectorGeoJson {\r\n\r\n    /**\r\n     * ITS device layer, types available at http://transportal.cee.wisc.edu/its/inventory/\r\n     * @param {object} options - config\r\n     * @param {string} [options.id] - layer id\r\n     * @param {string} [options.name=Unnamed Layer] - layer name\r\n     * @param {number} [options.opacity=1] - opacity\r\n     * @param {boolean} [options.visible=true] - default visible\r\n     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n     * @param {number} [options.zIndex=0] the z index for the layer\r\n     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n     *\r\n     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n     * @param {object|*} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n     *\r\n     * @param {string} options.itsType the ITS device type, use the url flag at http://transportal.cee.wisc.edu/its/inventory/\r\n     * @param {boolean} [options.addPopup=true] if the popup should be added automatically\r\n     *\r\n     * @param {string} [options.itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n     *\r\n     * @param {object} [options.itsLineStyle=undefined] A single line style\r\n     * @param {string} options.itsLineStyle.color the line color as rgb or hex\r\n     * @param {number} [options.itsLineStyle.width=5] the line width\r\n     *\r\n     * @param {object} [options.itsIconConfig=undefined] The icon subtype configuration\r\n     * @param {string} options.itsIconConfig.prop The property used to define icon attribute symbolization\r\n     * @param {string} options.itsIconConfig.defaultName The default name to be used if no other match is found\r\n     * @param {string} options.itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n     * @param {object} [options.itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n     *\r\n     * @param {object} [options.itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n     * @param {string} options.itsLineConfig.prop The property used to define icon attribute symbolization\r\n     * @param {string} [options.itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n     * @param {string} [options.itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n     * @param {number} [options.itsLineConfig.defaultWidth] The default line width to be used for no other matches\r\n     * @param {object} [options.itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width = 5]\r\n     */\r\n    constructor(options) {\r\n        if (typeof options.itsType !== 'string') {\r\n            throw 'its type must be defined';\r\n        }\r\n\r\n        let addToLegend = '';\r\n\r\n        // define a style with the helper function if it is not explicitly defined\r\n        if (typeof options.style == 'undefined') {\r\n            options.style = defineStyle(\r\n                options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig\r\n            );\r\n            addToLegend = defineLegend(\r\n                options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig\r\n            );\r\n        }\r\n\r\n        options.params = typeof options.params == 'object' ? options.params : {};\r\n        $.extend(options.params, {format: 'JSON', resource: options.itsType});\r\n\r\n        super('http://transportal.cee.wisc.edu/its/inventory/', options);\r\n\r\n        //add any additional content to the legend\r\n        this.addLegendContent(addToLegend);\r\n\r\n        options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : true;\r\n\r\n        if (options.addPopup) {\r\n            mapPopup.addVectorPopup(this, function (props) {\r\n                return `<iframe src=\"http://transportal.cee.wisc.edu/its/inventory/?feature=${props['featureGuid']}\" ` +\r\n                    `height=\"250\" width=\"350\"></iframe>`;\r\n            });\r\n        }\r\n    }\r\n\r\n    /**\r\n     * callback to generate the parameters passed in the get request\r\n     * @callback makeGetParams\r\n     * @param {object} extent - extent object\r\n     * @param {number} extent.minX - minX\r\n     * @param {number} extent.minY - minY\r\n     * @param {number} extent.maxX - maxX\r\n     * @param {number} extent.maxY - maxY\r\n     * @param {number} zoomLevel - zoom level\r\n     */\r\n    mapMoveMakeGetParams(extent, zoomLevel) {\r\n        super.mapMoveMakeGetParams(extent, zoomLevel);\r\n        let lowerLeft = new ol.geom.Point([extent.minX, extent.minY]);\r\n        lowerLeft.transform(this.mapProj, this._projection4326);\r\n        let lowerLeftCoordinates = lowerLeft.getCoordinates();\r\n        let upperRight = new ol.geom.Point([extent.maxX, extent.maxY]);\r\n        upperRight.transform(this.mapProj, this._projection4326);\r\n        let upperRightCoordinates = upperRight.getCoordinates();\r\n\r\n        $.extend(this.mapMoveParams,\r\n            {\r\n                L: lowerLeftCoordinates[0],\r\n                R: upperRightCoordinates[0],\r\n                B: lowerLeftCoordinates[1],\r\n                T: upperRightCoordinates[1]\r\n            });\r\n    }\r\n}\r\n\r\nnm.LayerItsInventory = LayerItsInventory;\r\nexport default LayerItsInventory;\r\n"]}
\ No newline at end of file
+{"version":3,"file":"LayerItsInventory.js","sourceRoot":"","sources":["../../src/layers/LayerItsInventory.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;AAEH,mEAA8D;AAC9D,kDAA6C;AAC7C,2CAAsC;AACtC,8BAAiC;AACjC,0BAA6B;AAC7B,wDAA2D;AAE3D,IAAI,EAAE,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;AAG3B,0BAA0B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa;IACzE,YAAY,CAAC;IAEb,sDAAsD;IACtD,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,EAAE,CAAC,CAAC,OAAO,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC;QAC7B,WAAW,EAAE,CAAC;IAClB,CAAC;IAED,EAAE,CAAC,CAAC,OAAO,YAAY,IAAI,QAAQ,CAAC,CAAC,CAAC;QAClC,YAAY,CAAC,KAAK,GAAG,OAAO,YAAY,CAAC,KAAK,IAAI,QAAQ,GAAG,YAAY,CAAC,KAAK,GAAG,CAAC,CAAC;QACpF,YAAY,CAAC,KAAK,GAAG,OAAO,YAAY,CAAC,KAAK,IAAI,QAAQ,GAAG,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;QACxF,WAAW,EAAE,CAAC;IAClB,CAAC;IAED,EAAE,CAAC,CAAC,OAAO,aAAa,IAAI,QAAQ,CAAC,CAAC,CAAC;QACnC,aAAa,CAAC,WAAW,GAAG,aAAa,CAAC,WAAW,IAAI,OAAO,CAAC;QAEjE,EAAE,CAAC,CAAC,OAAO,aAAa,CAAC,SAAS,IAAI,WA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S,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACxD,IAAI,oBAAoB,GAAG,SAAS,CAAC,cAAc,EAAE,CAAC;QACtD,IAAI,UAAU,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/D,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACzD,IAAI,qBAAqB,GAAG,UAAU,CAAC,cAAc,EAAE,CAAC;QAExD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EACvB;YACI,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;YAC1B,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC;YAC3B,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;YAC1B,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC;SAC9B,CAAC,CAAC;IACX,CAAC;IACL,wBAAC;AAAD,CAAC,AA9GD,CAAgC,gCAAsB,GA8GrD;AAED,EAAE,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AACzC,kBAAe,iBAAiB,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\n\r\nimport LayerBaseVectorGeoJson from './LayerBaseVectorGeoJson';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {proj4326, proj3857} from '../olHelpers/projections'\r\n\r\nlet nm = provide('layers');\r\n\r\n\r\nfunction checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n    \"use strict\";\r\n\r\n    //make sure one and only one configuration is defined;\r\n    let configCount = 0;\r\n    if (typeof itsIcon == 'string') {\r\n        configCount++;\r\n    }\r\n\r\n    if (typeof itsLineStyle == 'object') {\r\n        itsLineStyle.width = typeof itsLineStyle.width == 'number' ? itsLineStyle.width : 5;\r\n        itsLineStyle.color = typeof itsLineStyle.color == 'string' ? itsLineStyle.color : 'red';\r\n        configCount++;\r\n    }\r\n\r\n    if (typeof itsIconConfig == 'object') {\r\n        itsIconConfig.defaultName = itsIconConfig.defaultName || 'Other';\r\n\r\n        if (typeof itsIconConfig.iconArray == 'undefined') {\r\n            itsIconConfig.iconArray = [];\r\n        }\r\n\r\n        configCount++;\r\n    }\r\n\r\n    if (typeof itsLineConfig == 'object') {\r\n        itsLineConfig.defaultName = itsLineConfig.defaultName || 'Other';\r\n        itsLineConfig.defaultWidth = itsLineConfig.defaultWidth || 5;\r\n        itsLineConfig.defaultColor = itsLineConfig.defaultColor || 'red';\r\n\r\n\r\n        if (typeof itsLineConfig.lineArray == 'undefined') {\r\n            itsLineConfig.lineArray = [];\r\n        }\r\n\r\n        // set the width if not defined\r\n        for (let i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n            if (itsLineConfig.lineArray[i].length == 3) {\r\n                itsLineConfig.lineArray[i].push(5);\r\n            }\r\n        }\r\n\r\n        configCount++;\r\n    }\r\n\r\n    if (configCount > 1) {\r\n        throw 'Only one style config can be defined';\r\n    }\r\n}\r\n\r\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [itsLineStyle=undefined] A single line style\r\n * @param {string} itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n * @returns {*} undefined, style, or style function\r\n */\r\nfunction defineStyle(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) : ol.style.Style|Array<ol.style.Style>|ol.StyleFunction{\r\n    \"use strict\";\r\n    checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\r\n    let _iconUrlRoot = 'http://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\r\n    if (itsIcon) {\r\n        return new ol.style.Style({\r\n            image: new ol.style.Icon(\r\n                {\r\n                    src: _iconUrlRoot + itsIcon,\r\n                    crossOrigin: 'anonymous'\r\n                }\r\n            )\r\n        });\r\n    } else if (itsLineStyle) {\r\n        return new ol.style.Style({\r\n            stroke: new ol.style.Stroke({\r\n                color: itsLineStyle.color,\r\n                width: itsLineStyle.width\r\n            })\r\n        });\r\n    } else if (itsIconConfig) {\r\n        return function (feature: ol.Feature) {\r\n            let symbolProp = feature.getProperties()[itsIconConfig.prop];\r\n            let iconUrl = _iconUrlRoot + itsIconConfig.defaultIcon;\r\n\r\n            for (let i = 0; i < itsIconConfig.iconArray.length; i++) {\r\n                let thisProp = itsIconConfig.iconArray[i];\r\n\r\n                if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n                    iconUrl = _iconUrlRoot + thisProp[2];\r\n                    break;\r\n                }\r\n            }\r\n\r\n            return [new ol.style.Style({\r\n                image: new ol.style.Icon(\r\n                    {\r\n                        src: iconUrl,\r\n                        crossOrigin: 'anonymous'\r\n                    }\r\n                )\r\n            })];\r\n        };\r\n    } else if (itsLineConfig) {\r\n        return function (feature: ol.Feature) {\r\n            let symbolProp = feature.getProperties()[itsLineConfig.prop];\r\n            let colr = itsLineConfig.defaultColor || 'red';\r\n            let width = itsLineConfig.defaultWidth || 5;\r\n\r\n            for (let i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n                let thisProp = itsLineConfig.lineArray[i];\r\n\r\n                if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n                    colr = thisProp[2];\r\n                    width = thisProp[3];\r\n                    break;\r\n                }\r\n            }\r\n\r\n            return [new ol.style.Style({\r\n                stroke: new ol.style.Stroke({\r\n                    color: colr,\r\n                    width: width\r\n                })\r\n            })];\r\n        };\r\n    } else {\r\n        return undefined;\r\n    }\r\n}\r\n\r\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [itsLineStyle=undefined] A single line style\r\n * @param {string} itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n * @returns {string} html to be added to the legend\r\n */\r\nfunction defineLegend(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n    \"use strict\";\r\n\r\n    let iconHeight = 17;\r\n\r\n    checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\r\n    let _iconUrlRoot = 'http://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\r\n    if (itsIcon) {\r\n        return `<img src=\"${_iconUrlRoot + itsIcon}\" class=\"legend-layer-icon\" height=\"${iconHeight}\">`;\r\n    } else if (itsLineStyle) {\r\n        return `<hr style=\"height: ${itsLineStyle.width}px; background-color: ${itsLineStyle.color}\">`;\r\n    } else if (itsIconConfig) {\r\n        let outHtml = '';\r\n        outHtml += '<ul>';\r\n\r\n        for (let a of itsIconConfig.iconArray) {\r\n            outHtml += `<li><span class=\"legend-layer-subitem\">${a[1]}</span><img src=\"${_iconUrlRoot + a[2]}\" class=\"legend-layer-icon\" height=\"${iconHeight}\">`;\r\n        }\r\n        outHtml += `<li><span class=\"legend-layer-subitem\">${itsIconConfig.defaultName}</span>` +\r\n            `<img src=\"${_iconUrlRoot + itsIconConfig.defaultIcon}\" class=\"legend-layer-icon\" height=\"${iconHeight}\"></li>`;\r\n        outHtml += '</ul>';\r\n\r\n        return outHtml;\r\n    } else if (itsLineConfig) {\r\n        let outHtml = '';\r\n        outHtml += '<ul>';\r\n        for (let ls of itsLineConfig.lineArray) {\r\n            outHtml += `<li><span class=\"legend-layer-subitem\">${ls[1]}</span>` +\r\n                `<hr style=\"height: ${ls[3]}px; background-color: ${ls[2]}\">`;\r\n        }\r\n        outHtml += `<li><span class=\"legend-layer-subitem\">${itsLineConfig.defaultName}</span>` +\r\n            `<hr style=\"height: ${itsLineConfig.defaultWidth}px; background-color: ${itsLineConfig.defaultColor}\"></li>`;\r\n        outHtml += '</ul>';\r\n\r\n        return outHtml;\r\n    } else {\r\n        return '';\r\n    }\r\n}\r\n\r\n/**\r\n * Its Layer class\r\n * @augments LayerBaseVectorGeoJson\r\n */\r\nclass LayerItsInventory extends LayerBaseVectorGeoJson {\r\n\r\n    /**\r\n     * ITS device layer, types available at http://transportal.cee.wisc.edu/its/inventory/\r\n     * @param {object} options - config\r\n     * @param {string} [options.id] - layer id\r\n     * @param {string} [options.name=Unnamed Layer] - layer name\r\n     * @param {number} [options.opacity=1] - opacity\r\n     * @param {boolean} [options.visible=true] - default visible\r\n     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n     * @param {number} [options.zIndex=0] the z index for the layer\r\n     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n     *\r\n     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n     * @param {object|*} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n     *\r\n     * @param {string} options.itsType the ITS device type, use the url flag at http://transportal.cee.wisc.edu/its/inventory/\r\n     * @param {boolean} [options.addPopup=true] if the popup should be added automatically\r\n     *\r\n     * @param {string} [options.itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n     *\r\n     * @param {object} [options.itsLineStyle=undefined] A single line style\r\n     * @param {string} options.itsLineStyle.color the line color as rgb or hex\r\n     * @param {number} [options.itsLineStyle.width=5] the line width\r\n     *\r\n     * @param {object} [options.itsIconConfig=undefined] The icon subtype configuration\r\n     * @param {string} options.itsIconConfig.prop The property used to define icon attribute symbolization\r\n     * @param {string} options.itsIconConfig.defaultName The default name to be used if no other match is found\r\n     * @param {string} options.itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n     * @param {object} [options.itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n     *\r\n     * @param {object} [options.itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n     * @param {string} options.itsLineConfig.prop The property used to define icon attribute symbolization\r\n     * @param {string} [options.itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n     * @param {string} [options.itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n     * @param {number} [options.itsLineConfig.defaultWidth] The default line width to be used for no other matches\r\n     * @param {object} [options.itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width = 5]\r\n     */\r\n    constructor(options) {\r\n        if (typeof options.itsType !== 'string') {\r\n            throw 'its type must be defined';\r\n        }\r\n\r\n        options.transform = {dataProjection: proj4326, featureProjection: proj3857};\r\n\r\n        let addToLegend = '';\r\n\r\n        // define a style with the helper function if it is not explicitly defined\r\n        if (typeof options.style == 'undefined') {\r\n            options.style = defineStyle(\r\n                options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig\r\n            );\r\n            addToLegend = defineLegend(\r\n                options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig\r\n            );\r\n        }\r\n\r\n        options.params = typeof options.params == 'object' ? options.params : {};\r\n        $.extend(options.params, {format: 'JSON', resource: options.itsType});\r\n\r\n        super('http://transportal.cee.wisc.edu/its/inventory/', options);\r\n\r\n        //add any additional content to the legend\r\n        this.addLegendContent(addToLegend);\r\n\r\n        options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : true;\r\n\r\n        if (options.addPopup) {\r\n            mapPopup.addVectorPopup(this, function (props) {\r\n                return `<iframe src=\"http://transportal.cee.wisc.edu/its/inventory/?feature=${props['featureGuid']}\" ` +\r\n                    `height=\"250\" width=\"350\"></iframe>`;\r\n            });\r\n        }\r\n    }\r\n\r\n    /**\r\n     * callback to generate the parameters passed in the get request\r\n     * @callback makeGetParams\r\n     * @param {object} extent - extent object\r\n     * @param {number} extent.minX - minX\r\n     * @param {number} extent.minY - minY\r\n     * @param {number} extent.maxX - maxX\r\n     * @param {number} extent.maxY - maxY\r\n     * @param {number} zoomLevel - zoom level\r\n     */\r\n    mapMoveMakeGetParams(extent, zoomLevel) {\r\n        super.mapMoveMakeGetParams(extent, zoomLevel);\r\n        let lowerLeft = new ol.geom.Point([extent.minX, extent.minY]);\r\n        lowerLeft.transform(this.mapProj, this._projection4326);\r\n        let lowerLeftCoordinates = lowerLeft.getCoordinates();\r\n        let upperRight = new ol.geom.Point([extent.maxX, extent.maxY]);\r\n        upperRight.transform(this.mapProj, this._projection4326);\r\n        let upperRightCoordinates = upperRight.getCoordinates();\r\n\r\n        $.extend(this.mapMoveParams,\r\n            {\r\n                L: lowerLeftCoordinates[0],\r\n                R: upperRightCoordinates[0],\r\n                B: lowerLeftCoordinates[1],\r\n                T: upperRightCoordinates[1]\r\n            });\r\n    }\r\n}\r\n\r\nnm.LayerItsInventory = LayerItsInventory;\r\nexport default LayerItsInventory;\r\n"]}
\ No newline at end of file
diff --git a/src/layers/LayerBaseVectorGeoJson.ts b/src/layers/LayerBaseVectorGeoJson.ts
index c7b6e404ae4b8834d003f5d721c75e8610bdfc0f..620341a31133475f792f64341c4820dcc4287fc3 100644
--- a/src/layers/LayerBaseVectorGeoJson.ts
+++ b/src/layers/LayerBaseVectorGeoJson.ts
@@ -78,8 +78,12 @@ export class LayerBaseVectorGeoJson extends LayerBaseVector {
      * @param {object} featureCollection - as geojson object
      */
     addFeatures(featureCollection: any) {
-
-        this.source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection));
+        this.source.addFeatures(
+            this._geoJsonFormat.readFeatures(featureCollection,
+                {dataProjection: this._transform.dataProjection,
+                    featureProjection: this._transform.featureProjection}
+                )
+        );
     }
 
 
diff --git a/src/layers/LayerItsInventory.ts b/src/layers/LayerItsInventory.ts
index eae1c8ccda585f1de055872844ae4f7acfcdedab..8c973afb2ce6a32ded68553d4fc6fb7ea5035bcd 100644
--- a/src/layers/LayerItsInventory.ts
+++ b/src/layers/LayerItsInventory.ts
@@ -7,6 +7,7 @@ import mapPopup from '../olHelpers/mapPopup';
 import provide from '../util/provide';
 import ol = require('custom-ol');
 import $ = require('jquery');
+import {proj4326, proj3857} from '../olHelpers/projections'
 
 let nm = provide('layers');
 
@@ -275,6 +276,8 @@ class LayerItsInventory extends LayerBaseVectorGeoJson {
             throw 'its type must be defined';
         }
 
+        options.transform = {dataProjection: proj4326, featureProjection: proj3857};
+
         let addToLegend = '';
 
         // define a style with the helper function if it is not explicitly defined