diff --git a/dist/api/host.js b/dist/api/host.js index 88fb7229d752b44d446ef8649160cbf10cb872ec..591eaaa08c9f2b640686185a2ecb0fc76eb48b4e 100644 --- a/dist/api/host.js +++ b/dist/api/host.js @@ -1,6 +1,9 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var isLocal = window.location.href.indexOf('localhost') > -1; +if (parseInt(window.location.port) !== 8081) { + isLocal = false; +} var stage_prod = window.location.pathname.indexOf('webmapsstage') > -1 ? 'webmapsstage' : 'webmaps'; exports.hostRoot = isLocal ? 'http://localhost:8081' : "https://transportal.cee.wisc.edu/gis/" + stage_prod; exports.apiRoot = exports.hostRoot + "/api"; diff --git a/dist/api/host.js.map b/dist/api/host.js.map index afff248cb47e4b5f39b110a3f59c3c576994fd15..629a85ac06782be0fa5e6ae9faafc768ce8787f9 100644 --- a/dist/api/host.js.map +++ b/dist/api/host.js.map @@ -1 +1 @@ -{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/api/host.ts"],"names":[],"mappings":";;AAAA,IAAI,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;AAE7D,IAAI,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,GAAG,SAAS,CAAC;AAEvF,QAAA,QAAQ,GAAG,OAAO,GAAG,uBAAuB,GAAG,0CAAwC,UAAY,CAAC;AAEpG,QAAA,OAAO,GAAG,gBAAQ,GAAG,MAAM,CAAC","sourcesContent":["let isLocal = window.location.href.indexOf('localhost') > -1;\r\n\r\nlet stage_prod = window.location.pathname.indexOf('webmapsstage') > -1 ? 'webmapsstage' : 'webmaps';\r\n\r\nexport const hostRoot = isLocal ? 'http://localhost:8081' : `https://transportal.cee.wisc.edu/gis/${stage_prod}`;\r\n\r\nexport const apiRoot = hostRoot + `/api`;\r\n\r\n"]} \ No newline at end of file +{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/api/host.ts"],"names":[],"mappings":";;AAAA,IAAI,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;AAE7D,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAA,CAAC;IACzC,OAAO,GAAG,KAAK,CAAC;AACpB,CAAC;AAGD,IAAI,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,GAAG,SAAS,CAAC;AAEvF,QAAA,QAAQ,GAAG,OAAO,GAAG,uBAAuB,GAAG,0CAAwC,UAAY,CAAC;AAEpG,QAAA,OAAO,GAAG,gBAAQ,GAAG,MAAM,CAAC","sourcesContent":["let isLocal = window.location.href.indexOf('localhost') > -1;\r\n\r\nif (parseInt(window.location.port) !== 8081){\r\n isLocal = false;\r\n}\r\n\r\n\r\nlet stage_prod = window.location.pathname.indexOf('webmapsstage') > -1 ? 'webmapsstage' : 'webmaps';\r\n\r\nexport const hostRoot = isLocal ? 'http://localhost:8081' : `https://transportal.cee.wisc.edu/gis/${stage_prod}`;\r\n\r\nexport const apiRoot = hostRoot + `/api`;\r\n\r\n"]} \ No newline at end of file diff --git a/src/api/host.ts b/src/api/host.ts index f6fe2098ba64df142bedfbd58da80612c208719d..6b8a528c1060c173e37c4db8033fca17ce8aa6df 100644 --- a/src/api/host.ts +++ b/src/api/host.ts @@ -1,5 +1,10 @@ let isLocal = window.location.href.indexOf('localhost') > -1; +if (parseInt(window.location.port) !== 8081){ + isLocal = false; +} + + let stage_prod = window.location.pathname.indexOf('webmapsstage') > -1 ? 'webmapsstage' : 'webmaps'; export const hostRoot = isLocal ? 'http://localhost:8081' : `https://transportal.cee.wisc.edu/gis/${stage_prod}`; diff --git a/test/serve/html/simple_map.html b/test/serve/html/simple_map.html index d383e2170a9cb299dd5da9cde0ab03a936c54ff4..49e2fb0f7a07a49c1c681249fcd02e1a7d2bfba2 100644 --- a/test/serve/html/simple_map.html +++ b/test/serve/html/simple_map.html @@ -14,7 +14,7 @@ </div> <div id="map"></div> </div> -<script src="../lib/jquery.min.js"></script> +<script src="../lib/jquery.js"></script> <script src="../lib/ol.js"></script> <script src="../js/simple_map.js"></script>