diff --git a/dist/_tests/demos/animate.js b/dist/_tests/demos/animate.js index b711cadbb1a5dcc48e5190d8a3de6d89ee0876ba..9debffd3ac70a0b9e21cadfe512272101436d4c0 100644 --- a/dist/_tests/demos/animate.js +++ b/dist/_tests/demos/animate.js @@ -34,7 +34,7 @@ var media = new media_control_1.MediaControl($('#control'), function (v) { }); var map = quickMap_1.quickMap(); map.addLayer(nexrhresStatic.olLayer); -var coordinationLayer = new LayerBaseVectorEsri_1.LayerBaseVectorEsri('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0', { +var coordinationLayer = new LayerBaseVectorEsri_1.LayerBaseVectorEsri('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0', { visible: true, autoLoad: true, name: 'Coordination', diff --git a/dist/_tests/demos/animate.js.map b/dist/_tests/demos/animate.js.map index 58c67da500d7c0bd240a4d0e731308140a00d8e7..a85e693602669c8e0fc3ffa059e08360bb1df625 100644 --- a/dist/_tests/demos/animate.js.map +++ b/dist/_tests/demos/animate.js.map @@ -1 +1 @@ -{"version":3,"file":"animate.js","sourceRoot":"","sources":["../../../src/_tests/demos/animate.ts"],"names":[],"mappings":";;AAAA,qDAAkD;AAClD,sEAAiE;AACjE,6DAAyE;AACzE,0BAA6B;AAC7B,wEAAqE;AACrE,sEAAmE;AAEnE,IAAI,cAAc,GAAG,IAAI,4BAAkB,CAAC;IACpC,QAAQ,EAAE,UAAU;IACpB,EAAE,EAAE,iBAAiB;IACrB,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,qBAAqB;IAC3B,eAAe;IACf,gBAAgB,EAAE,UAAU,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;CACJ,CACJ,CAAC;AAGF,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;AACnB,IAAI,OAAO,GAAG,CAAC,CAAC,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GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,IAAI,aAAa,GAAG,IAAI,uCAAkB,CACtC,4DAA0D,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAY,EAC1F;QACI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,IAAI;KACvB,CACJ,CAAC;IACF,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC","sourcesContent":["import {quickMap} from '../../olHelpers/quickMap';\r\nimport LayerRealEarthTile from \"../../layers/LayerRealEarthTile\";\r\nimport {MediaControl, changeFunction} from \"../../domUtil/media-control\";\r\nimport $ = require('jquery');\r\nimport {LayerBaseVectorEsri} from \"../../layers/LayerBaseVectorEsri\";\r\nimport {LayerEsriMapServer} from \"../../layers/LayerEsriMapServer\";\r\n\r\nlet nexrhresStatic = new LayerRealEarthTile({\r\n products: 'nexrhres',\r\n id: 'nexrhres-static',\r\n opacity: 0.6,\r\n animate: true,\r\n name: 'Hybrid Reflectivity',\r\n // maxZoom: 10,\r\n timeLoadCallback: function (f) {\r\n console.log(f);\r\n }\r\n }\r\n);\r\n\r\n\r\nlet d = new Date();\r\nlet endTime = d.getTime();\r\nd.setHours(d.getHours() - 4);\r\nlet startTime = d.getTime();\r\nlet rangeStep = Math.round((endTime - startTime) / 8);\r\n\r\nlet media = new MediaControl(\r\n $('#control'),\r\n (v: number) => {\r\n nexrhresStatic.setLayerTime(v);\r\n },\r\n {\r\n min: startTime,\r\n max: endTime,\r\n val: endTime,\r\n step: rangeStep,\r\n playInterval: 750,\r\n showAsDate: true\r\n }\r\n);\r\n\r\n\r\nlet map = quickMap();\r\nmap.addLayer(nexrhresStatic.olLayer);\r\n\r\n\r\nlet coordinationLayer = new LayerBaseVectorEsri(\r\n 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0',\r\n {\r\n visible: true,\r\n autoLoad: true,\r\n name: 'Coordination',\r\n useEsriStyle: true\r\n }\r\n);\r\n\r\nmap.addLayer(coordinationLayer.olLayer);\r\n\r\n let oakRidgeLayers = [\r\n ['Cameras', 'cameras33'],\r\n ['HAR', 'HAR33'],\r\n ['DMS', 'MessageSigns33'],\r\n //['State Summary', 'statesummary'],\r\n ['Traffic Control', 'TrafficControl33'],\r\n ['Traffic Detection', 'TrafficDetectionMulti'],\r\n ['Weather', 'Weather33']\r\n ];\r\n\r\n\r\n for (let i = 0; i < oakRidgeLayers.length; i++) {\r\n let oakRidgeLayer = new LayerEsriMapServer(\r\n `http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/${oakRidgeLayers[i][1]}/MapServer`,\r\n {\r\n id: oakRidgeLayers[i][1],\r\n name: oakRidgeLayers[i][0],\r\n visible: true,\r\n minZoom: 7,\r\n zIndex: 20,\r\n addPopup: true,\r\n legendCollapse: true\r\n }\r\n );\r\n map.addLayer(oakRidgeLayer.olLayer);\r\n }\r\n\r\n"]} \ No newline at end of file +{"version":3,"file":"animate.js","sourceRoot":"","sources":["../../../src/_tests/demos/animate.ts"],"names":[],"mappings":";;AAAA,qDAAkD;AAClD,sEAAiE;AACjE,6DAAyE;AACzE,0BAA6B;AAC7B,wEAAqE;AACrE,sEAAmE;AAEnE,IAAI,cAAc,GAAG,IAAI,4BAAkB,CAAC;IACpC,QAAQ,EAAE,UAAU;IACpB,EAAE,EAAE,iBAAiB;IACrB,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,qBAAqB;IAC3B,eAAe;IACf,gBAAgB,EAAE,UAAU,CAAC;QACzB,OAAO,C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,EAAE,kBAAkB,CAAC;IACvC,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;IAC9C,CAAC,SAAS,EAAE,WAAW,CAAC;CAC3B,CAAC;AAGF,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,IAAI,aAAa,GAAG,IAAI,uCAAkB,CACtC,4DAA0D,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAY,EAC1F;QACI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,IAAI;KACvB,CACJ,CAAC;IACF,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC","sourcesContent":["import {quickMap} from '../../olHelpers/quickMap';\r\nimport LayerRealEarthTile from \"../../layers/LayerRealEarthTile\";\r\nimport {MediaControl, changeFunction} from \"../../domUtil/media-control\";\r\nimport $ = require('jquery');\r\nimport {LayerBaseVectorEsri} from \"../../layers/LayerBaseVectorEsri\";\r\nimport {LayerEsriMapServer} from \"../../layers/LayerEsriMapServer\";\r\n\r\nlet nexrhresStatic = new LayerRealEarthTile({\r\n products: 'nexrhres',\r\n id: 'nexrhres-static',\r\n opacity: 0.6,\r\n animate: true,\r\n name: 'Hybrid Reflectivity',\r\n // maxZoom: 10,\r\n timeLoadCallback: function (f) {\r\n console.log(f);\r\n }\r\n }\r\n);\r\n\r\n\r\nlet d = new Date();\r\nlet endTime = d.getTime();\r\nd.setHours(d.getHours() - 4);\r\nlet startTime = d.getTime();\r\nlet rangeStep = Math.round((endTime - startTime) / 8);\r\n\r\nlet media = new MediaControl(\r\n $('#control'),\r\n (v: number) => {\r\n nexrhresStatic.setLayerTime(v);\r\n },\r\n {\r\n min: startTime,\r\n max: endTime,\r\n val: endTime,\r\n step: rangeStep,\r\n playInterval: 750,\r\n showAsDate: true\r\n }\r\n);\r\n\r\n\r\nlet map = quickMap();\r\nmap.addLayer(nexrhresStatic.olLayer);\r\n\r\n\r\nlet coordinationLayer = new LayerBaseVectorEsri(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0',\r\n {\r\n visible: true,\r\n autoLoad: true,\r\n name: 'Coordination',\r\n useEsriStyle: true\r\n }\r\n);\r\n\r\nmap.addLayer(coordinationLayer.olLayer);\r\n\r\n let oakRidgeLayers = [\r\n ['Cameras', 'cameras33'],\r\n ['HAR', 'HAR33'],\r\n ['DMS', 'MessageSigns33'],\r\n //['State Summary', 'statesummary'],\r\n ['Traffic Control', 'TrafficControl33'],\r\n ['Traffic Detection', 'TrafficDetectionMulti'],\r\n ['Weather', 'Weather33']\r\n ];\r\n\r\n\r\n for (let i = 0; i < oakRidgeLayers.length; i++) {\r\n let oakRidgeLayer = new LayerEsriMapServer(\r\n `http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/${oakRidgeLayers[i][1]}/MapServer`,\r\n {\r\n id: oakRidgeLayers[i][1],\r\n name: oakRidgeLayers[i][0],\r\n visible: true,\r\n minZoom: 7,\r\n zIndex: 20,\r\n addPopup: true,\r\n legendCollapse: true\r\n }\r\n );\r\n map.addLayer(oakRidgeLayer.olLayer);\r\n }\r\n\r\n"]} \ No newline at end of file diff --git a/dist/_tests/demos/compare-test.js b/dist/_tests/demos/compare-test.js index b024b61b0dd669144fe49f96654379a1d31feb2c..ee1ec5290541f06f079e0d05acd526296e8da162 100644 --- a/dist/_tests/demos/compare-test.js +++ b/dist/_tests/demos/compare-test.js @@ -8,23 +8,23 @@ var layerSwipe_1 = require("../../olHelpers/layerSwipe"); var LayerEsriMapServer_1 = require("../../layers/LayerEsriMapServer"); var map = quickMap_1.quickMap(); var swiper = new layerSwipe_1.default(map); -var wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer', { +var wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer', { minZoom: 6, maxZoom: 12, name: 'WisDOT Regions' }); -var metamanagerSegments = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer', { +var metamanagerSegments = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer', { minZoom: 7, visible: true, name: 'Metamanager Segments' }); -var truckSpeed2014 = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', { +var truckSpeed2014 = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', { minZoom: 7, visible: true, name: 'truck2014', showLayers: [8] }); -var truckSpeed2015 = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', { +var truckSpeed2015 = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', { minZoom: 7, visible: true, name: 'truck2015', diff --git a/dist/_tests/demos/compare-test.js.map b/dist/_tests/demos/compare-test.js.map index a9ed4a7748faca04e860a691e6757a31eda823a2..0664f31fb7f678645dd93c7993c27eb7621d219f 100644 --- a/dist/_tests/demos/compare-test.js.map +++ b/dist/_tests/demos/compare-test.js.map @@ -1 +1 @@ -{"version":3,"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B,CAAC,CAAC;AAE1C,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;AACpC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;AAErC,UAAU,CAAC;AAEX,CAAC,EAAE,IAAI,CAAC,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 6/1/2016.\r\n */\r\nimport {quickMap} from '../../olHelpers/quickMap';\r\nimport LayerSwipe from '../../olHelpers/layerSwipe';\r\nimport {LayerEsriMapServer} from '../../layers/LayerEsriMapServer';\r\n\r\nlet map = quickMap();\r\n\r\n\r\nlet swiper = new LayerSwipe(map);\r\n\r\n\r\nlet wisDotRegions = new LayerEsriMapServer(\r\n 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions'\r\n });\r\n\r\nlet metamanagerSegments = new LayerEsriMapServer(\r\n 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'Metamanager Segments'\r\n });\r\n\r\nlet truckSpeed2014 = new LayerEsriMapServer(\r\n 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2014',\r\n showLayers: [8]\r\n });\r\n\r\nlet truckSpeed2015 = new LayerEsriMapServer(\r\n 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2015',\r\n showLayers: [9]\r\n });\r\n\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(truckSpeed2014.olLayer);\r\nmap.addLayer(truckSpeed2015.olLayer);\r\nmap.addLayer(metamanagerSegments.olLayer);\r\n\r\n\r\nswiper.addLeftLayer(wisDotRegions);\r\nswiper.addRightLayer(metamanagerSegments);\r\n\r\nswiper.addLeftLayer(truckSpeed2014);\r\nswiper.addRightLayer(truckSpeed2015);\r\n\r\nsetTimeout(() => {\r\n\r\n}, 5000);\r\n"]} \ No newline at end of file +{"version":3,"file":"compare-test.js","sourceRoot":"","sources":["../../../src/_tests/demos/compare-test.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,qDAAkD;AAClD,yDAAoD;AACpD,sEAAmE;AAEnE,IAAI,GAAG,GAAG,mBAAQ,EAAE,CAAC;AAGrB,IAAI,MAAM,GAAG,IAAI,oBAAU,CAAC,GAAG,CAAC,CAAC;AAGjC,IAAI,aAAa,GAAG,IAAI,uCAAkB,CACtC,+GAA+G,EAC/G;IACI,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,gBAAgB;CACzB,CAAC,CAAC;AAEP,IAAI,mBAAmB,GAAG,IAAI,uCAAkB,CAC5C,2GAA2G,EAC3G;IACI,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,sBAAsB;CAC/B,CAAC,CAAC;AAEP,IAAI,cAAc,GAAG,IAAI,uCAAkB,CACvC,qGAAqG,EACrG;IACI,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,WAAW;IACjB,UAAU,EAAE,CAAC,CAAC,CAAC;CAClB,CAAC,CAAC;AAEP,IAAI,cAAc,GAAG,IAAI,uCAAkB,CACvC,qGAAqG,EACrG;IACI,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,WAAW;IACjB,UAAU,EAAE,CAAC,CAAC,CAAC;CAClB,CAAC,CAAC;AAEP,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACpC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AACrC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AACrC,GAAG,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAG1C,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;AACnC,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;AAE1C,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;AACpC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;AAErC,UAAU,CAAC;AAEX,CAAC,EAAE,IAAI,CAAC,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 6/1/2016.\r\n */\r\nimport {quickMap} from '../../olHelpers/quickMap';\r\nimport LayerSwipe from '../../olHelpers/layerSwipe';\r\nimport {LayerEsriMapServer} from '../../layers/LayerEsriMapServer';\r\n\r\nlet map = quickMap();\r\n\r\n\r\nlet swiper = new LayerSwipe(map);\r\n\r\n\r\nlet wisDotRegions = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions'\r\n });\r\n\r\nlet metamanagerSegments = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'Metamanager Segments'\r\n });\r\n\r\nlet truckSpeed2014 = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2014',\r\n showLayers: [8]\r\n });\r\n\r\nlet truckSpeed2015 = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2015',\r\n showLayers: [9]\r\n });\r\n\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(truckSpeed2014.olLayer);\r\nmap.addLayer(truckSpeed2015.olLayer);\r\nmap.addLayer(metamanagerSegments.olLayer);\r\n\r\n\r\nswiper.addLeftLayer(wisDotRegions);\r\nswiper.addRightLayer(metamanagerSegments);\r\n\r\nswiper.addLeftLayer(truckSpeed2014);\r\nswiper.addRightLayer(truckSpeed2015);\r\n\r\nsetTimeout(() => {\r\n\r\n}, 5000);\r\n"]} \ No newline at end of file diff --git a/dist/_tests/demos/simple_map.js b/dist/_tests/demos/simple_map.js index f7028c4ff07db85f24848690d919ea68c7ea8646..4f5654919817e4256538203fa16a523e125b95f1 100644 --- a/dist/_tests/demos/simple_map.js +++ b/dist/_tests/demos/simple_map.js @@ -7,8 +7,8 @@ var quickMap_1 = require("../../olHelpers/quickMap"); var LayerEsriMapServer_1 = require("../../layers/LayerEsriMapServer"); var LayerLegend_1 = require("../../collections/LayerLegend"); var map = quickMap_1.quickMap(); -var wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer'); -var sixYearPlan = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', { name: 'Six Year Plan', legendCollapse: true }); +var wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer'); +var sixYearPlan = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', { name: 'Six Year Plan', legendCollapse: true }); map.addLayer(wisDotRegions.olLayer); map.addLayer(sixYearPlan.olLayer); var layerArray = [ diff --git a/dist/_tests/demos/simple_map.js.map b/dist/_tests/demos/simple_map.js.map index 24f68c295dbe35e86d4db6e62065dca1a60b83a8..8b63ff56e0d1ad3224784a36dde850d9d0336e6c 100644 --- a/dist/_tests/demos/simple_map.js.map +++ b/dist/_tests/demos/simple_map.js.map @@ -1 +1 @@ -{"version":3,"file":"simple_map.js","sourceRoot":"","sources":["../../../src/_tests/demos/simple_map.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,qDAAkD;AAClD,sEAAmE;AACnE,6DAAwD;AAGxD,IAAI,GAAG,GAAG,mBAAQ,EAAE,CAAC;AAErB,IAAI,aAAa,GAAG,IAAI,uCAAkB,CACtC,8GAA8G,CAAC,CAAC;AAEpH,IAAI,WAAW,GAAG,IAAI,uCAAkB,CACpC,sGAAsG,EAAE,EAAC,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI,EAAC,CAAC,CAAC;AAE3J,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACpC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAElC,IAAI,UAAU,GAAG;IACb,aAAa;IACb,WAAW;IACX,6BAA6B;IAC7B,iCAAiC;IACjC,IAAI;IACJ,yCAAyC;IACzC,sBAAsB;IACtB,uBAAuB;IACvB,iDAAiD;IACjD,IAAI;CACP,CAAC;AAEF,IAAI,MAAM,GAAG,IAAI,qBAAW,CAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 9/23/2016.\r\n */\r\nimport {quickMap} from '../../olHelpers/quickMap';\r\nimport {LayerEsriMapServer} from \"../../layers/LayerEsriMapServer\";\r\nimport LayerLegend from '../../collections/LayerLegend';\r\n\r\n\r\nlet map = quickMap();\r\n\r\nlet wisDotRegions = new LayerEsriMapServer(\r\n 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');\r\n\r\nlet sixYearPlan = new LayerEsriMapServer(\r\n 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', {name: 'Six Year Plan', legendCollapse: true});\r\n\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(sixYearPlan.olLayer);\r\n\r\nlet layerArray = [\r\n wisDotRegions,\r\n sixYearPlan\r\n // tipConfig.tipSegmentLayer,\r\n // tipConfig.metamanagerSegments,\r\n // {\r\n // groupName: 'ITS Inventory Layers',\r\n // collapse: true,\r\n // addCheck: false,\r\n // items: tipConfig.itsLayerCollection.layers\r\n // }\r\n];\r\n\r\nlet legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\n\r\n\r\n"]} \ No newline at end of file +{"version":3,"file":"simple_map.js","sourceRoot":"","sources":["../../../src/_tests/demos/simple_map.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,qDAAkD;AAClD,sEAAmE;AACnE,6DAAwD;AAGxD,IAAI,GAAG,GAAG,mBAAQ,EAAE,CAAC;AAErB,IAAI,aAAa,GAAG,IAAI,uCAAkB,CACtC,+GAA+G,CAAC,CAAC;AAErH,IAAI,WAAW,GAAG,IAAI,uCAAkB,CACpC,uGAAuG,EAAE,EAAC,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI,EAAC,CAAC,CAAC;AAE5J,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACpC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAElC,IAAI,UAAU,GAAG;IACb,aAAa;IACb,WAAW;IACX,6BAA6B;IAC7B,iCAAiC;IACjC,IAAI;IACJ,yCAAyC;IACzC,sBAAsB;IACtB,uBAAuB;IACvB,iDAAiD;IACjD,IAAI;CACP,CAAC;AAEF,IAAI,MAAM,GAAG,IAAI,qBAAW,CAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 9/23/2016.\r\n */\r\nimport {quickMap} from '../../olHelpers/quickMap';\r\nimport {LayerEsriMapServer} from \"../../layers/LayerEsriMapServer\";\r\nimport LayerLegend from '../../collections/LayerLegend';\r\n\r\n\r\nlet map = quickMap();\r\n\r\nlet wisDotRegions = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');\r\n\r\nlet sixYearPlan = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', {name: 'Six Year Plan', legendCollapse: true});\r\n\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(sixYearPlan.olLayer);\r\n\r\nlet layerArray = [\r\n wisDotRegions,\r\n sixYearPlan\r\n // tipConfig.tipSegmentLayer,\r\n // tipConfig.metamanagerSegments,\r\n // {\r\n // groupName: 'ITS Inventory Layers',\r\n // collapse: true,\r\n // addCheck: false,\r\n // items: tipConfig.itsLayerCollection.layers\r\n // }\r\n];\r\n\r\nlet legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\n\r\n\r\n"]} \ No newline at end of file diff --git a/dist/layers/LayerBaseVectorEsri.d.ts b/dist/layers/LayerBaseVectorEsri.d.ts index c1f52cf1062cf5386eab963711dc8f1ab6447201..5e409f39aa7f667bf5e1338a625884000fd4ecb3 100644 --- a/dist/layers/LayerBaseVectorEsri.d.ts +++ b/dist/layers/LayerBaseVectorEsri.d.ts @@ -3,6 +3,13 @@ */ import { LayerBaseVector, LayerBaseVectorOptions } from './LayerBaseVector'; import ol = require('custom-ol'); +/** + * Helper to return the url to the service on the production server + * @param {string} folder + * @param {string} service + * @returns {string} + */ +export declare function makeServiceUrl(folder: string, service: string): string; export interface LayerBaseVectorEsriOptions extends LayerBaseVectorOptions { format?: string; outSR?: number; diff --git a/dist/layers/LayerBaseVectorEsri.js b/dist/layers/LayerBaseVectorEsri.js index 91acddfd341d80ccab0ccbebc1ec79bb506e14dd..37b8a841f490856aa5566641a7a69983c7b0326b 100644 --- a/dist/layers/LayerBaseVectorEsri.js +++ b/dist/layers/LayerBaseVectorEsri.js @@ -19,6 +19,16 @@ var provide_1 = require("../util/provide"); var ol = require("custom-ol"); var $ = require("jquery"); var nm = provide_1.default('layers'); +/** + * Helper to return the url to the service on the production server + * @param {string} folder + * @param {string} service + * @returns {string} + */ +function makeServiceUrl(folder, service) { + return "https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/" + folder + "/" + service + "/MapServer"; +} +exports.makeServiceUrl = makeServiceUrl; /** * Base layer for esri vector layers * @augments LayerBaseVector diff --git a/dist/layers/LayerBaseVectorEsri.js.map b/dist/layers/LayerBaseVectorEsri.js.map index 387c63e37fa7e0b449883174676ce9f735ad449d..1dda3eaefe30151d3e189a1e2b31c8f26cef12ee 100644 --- a/dist/layers/LayerBaseVectorEsri.js.map +++ b/dist/layers/LayerBaseVectorEsri.js.map @@ -1 +1 @@ -{"version":3,"file":"LayerBaseVectorEsri.js","sourceRoot":"","sources":["../../src/layers/LayerBaseVectorEsri.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;AAEH,qDAA0E;AAC1E,qDAAuD;AACvD,2CAAsC;AACtC,8BAAiC;AACjC,0BAA6B;AAC7B,IAAI,EAAE,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;AAU3B;;;GAGG;AACH;IAAyC,uCAAe;IAMpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,6BAAY,GAAW,EAAE,OAAmC;QAA5D,iBA8BC;QA5BG,EAAE,CAAC,CAAC,OAAO,OAAO,CAAC,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC;YACpC,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;QACjD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,SAAS,IAAI,GAAG,CAAC;QACvD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC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LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nlet nm = provide('layers');\r\n\r\nexport interface LayerBaseVectorEsriOptions extends LayerBaseVectorOptions{\r\n format?: string;\r\n outSR?: number;\r\n where?: string;\r\n outFields?: string;\r\n useEsriStyle?: boolean;\r\n}\r\n\r\n/**\r\n * Base layer for esri vector layers\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorEsri extends LayerBaseVector {\r\n _outSR: number;\r\n _esriFormat: ol.format.EsriJSON;\r\n _urlCopy: string;\r\n _useEsriStyle: boolean;\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - url for source\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.where=1=1] the layer filter clause\r\n * @param {string} [options.outFields=*] comma separated list of output fields, defaults to all\r\n * @param {string} [options.format=pjson] the format the retrieve the data\r\n * @param {number} [options.outSR=3857] the output spatial reference, defaults to web mercator\r\n * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n * @param {boolean} [options.collapseLegend=false] if the legend should be initially collapsed\r\n * @param {number} [options.mapMoveMakeGetParams=function(extent, zoomLevel){}] function to create additional map move params\r\n */\r\n constructor(url: string, options: LayerBaseVectorEsriOptions) {\r\n\r\n if (typeof options.params != 'object') {\r\n options.params = {};\r\n }\r\n options.params['where'] = options.where || '1=1';\r\n options.params['outFields'] = options.outFields || '*';\r\n options.params['f'] = options.format || 'pjson';\r\n options.params['outSR'] = options.outSR || 3857;\r\n\r\n super(url, options);\r\n this._outSR = this.params['outSR'];\r\n this._esriFormat = new ol.format.EsriJSON();\r\n\r\n if (this._url[this._url.length - 1] !== '/') {\r\n this._url += '/';\r\n }\r\n\r\n this._urlCopy = this.url;\r\n this._url += 'query?callback=?';\r\n\r\n if (this.autoLoad || this.visible) {\r\n this._load();\r\n }\r\n\r\n this._useEsriStyle = typeof options.useEsriStyle == 'boolean' ? options.useEsriStyle : false;\r\n\r\n if (this._useEsriStyle) {\r\n this.addLegendContent();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content to add to legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n if (!this._useEsriStyle) {\r\n super.addLegendContent(additionalContent);\r\n } else {\r\n $.get(this._urlCopy + '?f=pjson&callback=?', {}, (d) => {\r\n if (d['subLayers'].length > 0) {\r\n alert('should only use single feature layers, not groups');\r\n\r\n return;\r\n }\r\n\r\n let newStyleAndLegend = esriToOl.makeFeatureServiceLegendAndSymbol(d);\r\n this.style = newStyleAndLegend.style;\r\n super.addLegendContent(newStyleAndLegend.legend);\r\n }, 'json');\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - features as esrijson\r\n */\r\n addFeatures(featureCollection: Object) {\r\n let feats = this._esriFormat.readFeatures(featureCollection);\r\n this.source.addFeatures(feats);\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 if (super._load()) {\r\n return true;\r\n }\r\n $.get(this._url, this.params, (d) => {\r\n this.addFeatures(d);\r\n this.loadCallback(this);\r\n }, 'json').fail(() => {\r\n this._loaded = false;\r\n });\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\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: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n super.mapMoveMakeGetParams(extent, zoomLevel);\r\n this.mapMoveParams['geometry'] = `${extent.minX},${extent.minY},${extent.maxX},${extent.maxY}`;\r\n this.mapMoveParams['geometryType'] = 'esriGeometryEnvelope';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['inSR'] = 3857;\r\n if (this._outSR == 3857) {\r\n this.mapMoveParams['geometryPrecision'] = 1;\r\n }\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n return super.mapMoveBefore(zoom, evtType);\r\n //if (super.mapMoveBefore(zoom, evtType)){\r\n // //place holder for additional processing\r\n // return true;\r\n //} else {\r\n // return false;\r\n //}\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n super.mapMoveCallback(d);\r\n this.source.addFeatures(this._esriFormat.readFeatures(d));\r\n }\r\n}\r\n\r\nnm.LayerBaseVectorEsri = LayerBaseVectorEsri;\r\nexport default LayerBaseVectorEsri;\r\n"]} \ No newline at end of file +{"version":3,"file":"LayerBaseVectorEsri.js","sourceRoot":"","sources":["../../src/layers/LayerBaseVectorEsri.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;AAEH,qDAA0E;AAC1E,qDAAuD;AACvD,2CAAsC;AACtC,8BAAiC;AACjC,0BAA6B;AAC7B,IAAI,EAAE,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;AAG3B;;;;;GAKG;AACH,wBAA+B,MAAc,EAAE,OAAe;IAC1D,MAAM,CAAC,yEAAuE,MAAM,SAAI,OAAO,eAAY,CAAA;AAC/G,CAAC;AAFD,wCAEC;AAUD;;;GAGG;AACH;IAAyC,uCAAe;IAMpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,6BAAY,GAAW,EAAE,OAAmC;QAA5D,iBA8BC;QA5BG,EAAE,CAAC,CAAC,OAAO,OAAO,CAAC,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC;YACpC,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;QACjD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,SAAS,IAAI,GAAG,CAAC;QACvD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC;QAChD,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC;QAEhD,QAAA,kBAAM,GAAG,EAAE,OAAO,CAAC,SAAC;QACpB,KAAI,CAAC,MAAM,GAAG,KAAI,CAAC,MAAM,CAAC,OAAO,CAAC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C,GAAG,sBAAsB,CAAC;QAC5D,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,0BAA0B,CAAC;QAC9D,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,0BAA0B,CAAC;QAC9D,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAClC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;QAChD,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,2CAAa,GAAb,UAAc,IAAY,EAAE,OAAe;QACvC,MAAM,CAAC,iBAAM,aAAa,YAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC1C,0CAA0C;QAC1C,8CAA8C;QAC9C,kBAAkB;QAClB,UAAU;QACV,mBAAmB;QACnB,GAAG;IACP,CAAC;IAED;;;OAGG;IACH,6CAAe,GAAf,UAAgB,CAAS;QACrB,iBAAM,eAAe,YAAC,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;IACL,0BAAC;AAAD,CAAC,AArKD,CAAyC,iCAAe,GAqKvD;AArKY,kDAAmB;AAuKhC,EAAE,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAC7C,kBAAe,mBAAmB,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nlet nm = provide('layers');\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer`\r\n}\r\n\r\nexport interface LayerBaseVectorEsriOptions extends LayerBaseVectorOptions{\r\n format?: string;\r\n outSR?: number;\r\n where?: string;\r\n outFields?: string;\r\n useEsriStyle?: boolean;\r\n}\r\n\r\n/**\r\n * Base layer for esri vector layers\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorEsri extends LayerBaseVector {\r\n _outSR: number;\r\n _esriFormat: ol.format.EsriJSON;\r\n _urlCopy: string;\r\n _useEsriStyle: boolean;\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - url for source\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.where=1=1] the layer filter clause\r\n * @param {string} [options.outFields=*] comma separated list of output fields, defaults to all\r\n * @param {string} [options.format=pjson] the format the retrieve the data\r\n * @param {number} [options.outSR=3857] the output spatial reference, defaults to web mercator\r\n * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n * @param {boolean} [options.collapseLegend=false] if the legend should be initially collapsed\r\n * @param {number} [options.mapMoveMakeGetParams=function(extent, zoomLevel){}] function to create additional map move params\r\n */\r\n constructor(url: string, options: LayerBaseVectorEsriOptions) {\r\n\r\n if (typeof options.params != 'object') {\r\n options.params = {};\r\n }\r\n options.params['where'] = options.where || '1=1';\r\n options.params['outFields'] = options.outFields || '*';\r\n options.params['f'] = options.format || 'pjson';\r\n options.params['outSR'] = options.outSR || 3857;\r\n\r\n super(url, options);\r\n this._outSR = this.params['outSR'];\r\n this._esriFormat = new ol.format.EsriJSON();\r\n\r\n if (this._url[this._url.length - 1] !== '/') {\r\n this._url += '/';\r\n }\r\n\r\n this._urlCopy = this.url;\r\n this._url += 'query?callback=?';\r\n\r\n if (this.autoLoad || this.visible) {\r\n this._load();\r\n }\r\n\r\n this._useEsriStyle = typeof options.useEsriStyle == 'boolean' ? options.useEsriStyle : false;\r\n\r\n if (this._useEsriStyle) {\r\n this.addLegendContent();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content to add to legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n if (!this._useEsriStyle) {\r\n super.addLegendContent(additionalContent);\r\n } else {\r\n $.get(this._urlCopy + '?f=pjson&callback=?', {}, (d) => {\r\n if (d['subLayers'].length > 0) {\r\n alert('should only use single feature layers, not groups');\r\n\r\n return;\r\n }\r\n\r\n let newStyleAndLegend = esriToOl.makeFeatureServiceLegendAndSymbol(d);\r\n this.style = newStyleAndLegend.style;\r\n super.addLegendContent(newStyleAndLegend.legend);\r\n }, 'json');\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - features as esrijson\r\n */\r\n addFeatures(featureCollection: Object) {\r\n let feats = this._esriFormat.readFeatures(featureCollection);\r\n this.source.addFeatures(feats);\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 if (super._load()) {\r\n return true;\r\n }\r\n $.get(this._url, this.params, (d) => {\r\n this.addFeatures(d);\r\n this.loadCallback(this);\r\n }, 'json').fail(() => {\r\n this._loaded = false;\r\n });\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\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: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n super.mapMoveMakeGetParams(extent, zoomLevel);\r\n this.mapMoveParams['geometry'] = `${extent.minX},${extent.minY},${extent.maxX},${extent.maxY}`;\r\n this.mapMoveParams['geometryType'] = 'esriGeometryEnvelope';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['inSR'] = 3857;\r\n if (this._outSR == 3857) {\r\n this.mapMoveParams['geometryPrecision'] = 1;\r\n }\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n return super.mapMoveBefore(zoom, evtType);\r\n //if (super.mapMoveBefore(zoom, evtType)){\r\n // //place holder for additional processing\r\n // return true;\r\n //} else {\r\n // return false;\r\n //}\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n super.mapMoveCallback(d);\r\n this.source.addFeatures(this._esriFormat.readFeatures(d));\r\n }\r\n}\r\n\r\nnm.LayerBaseVectorEsri = LayerBaseVectorEsri;\r\nexport default LayerBaseVectorEsri;\r\n"]} \ No newline at end of file diff --git a/src/_tests/demos/animate.ts b/src/_tests/demos/animate.ts index 41dd1d5140e08f3369b86f34ecb14795899e54fa..8afbf3f8122361f59d5efda46938415fb35da7b0 100644 --- a/src/_tests/demos/animate.ts +++ b/src/_tests/demos/animate.ts @@ -46,7 +46,7 @@ map.addLayer(nexrhresStatic.olLayer); let coordinationLayer = new LayerBaseVectorEsri( - 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0', + 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0', { visible: true, autoLoad: true, diff --git a/src/_tests/demos/compare-test.ts b/src/_tests/demos/compare-test.ts index dc638df0f765466b5541e962e073a001ce25575a..8de8fc9fd6cf35cd4e877884a3607d0e8d074cd3 100644 --- a/src/_tests/demos/compare-test.ts +++ b/src/_tests/demos/compare-test.ts @@ -12,7 +12,7 @@ let swiper = new LayerSwipe(map); let wisDotRegions = new LayerEsriMapServer( - 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer', + 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer', { minZoom: 6, maxZoom: 12, @@ -20,7 +20,7 @@ let wisDotRegions = new LayerEsriMapServer( }); let metamanagerSegments = new LayerEsriMapServer( - 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer', + 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer', { minZoom: 7, visible: true, @@ -28,7 +28,7 @@ let metamanagerSegments = new LayerEsriMapServer( }); let truckSpeed2014 = new LayerEsriMapServer( - 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', + 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', { minZoom: 7, visible: true, @@ -37,7 +37,7 @@ let truckSpeed2014 = new LayerEsriMapServer( }); let truckSpeed2015 = new LayerEsriMapServer( - 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', + 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', { minZoom: 7, visible: true, diff --git a/src/_tests/demos/simple_map.ts b/src/_tests/demos/simple_map.ts index e3233f88dad32e722efb01c504f5e8335e9ca016..58cfd63dc3ba8685dd11bdb092973f622529e69e 100644 --- a/src/_tests/demos/simple_map.ts +++ b/src/_tests/demos/simple_map.ts @@ -9,10 +9,10 @@ import LayerLegend from '../../collections/LayerLegend'; let map = quickMap(); let wisDotRegions = new LayerEsriMapServer( - 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer'); + 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer'); let sixYearPlan = new LayerEsriMapServer( - 'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', {name: 'Six Year Plan', legendCollapse: true}); + 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', {name: 'Six Year Plan', legendCollapse: true}); map.addLayer(wisDotRegions.olLayer); map.addLayer(sixYearPlan.olLayer); diff --git a/src/layers/LayerBaseVectorEsri.ts b/src/layers/LayerBaseVectorEsri.ts index 053ede559bcdd1f29372e01bb65404b4e8f78b5c..d8b96d55955819c46aa3d924ed7bab6c3729c25c 100644 --- a/src/layers/LayerBaseVectorEsri.ts +++ b/src/layers/LayerBaseVectorEsri.ts @@ -9,6 +9,17 @@ import ol = require('custom-ol'); import $ = require('jquery'); let nm = provide('layers'); + +/** + * Helper to return the url to the service on the production server + * @param {string} folder + * @param {string} service + * @returns {string} + */ +export function makeServiceUrl(folder: string, service: string): string{ + return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer` +} + export interface LayerBaseVectorEsriOptions extends LayerBaseVectorOptions{ format?: string; outSR?: number;