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

add catch for alternate port

parent 6bbacb72
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,8 @@ function makeServiceUrl(folder, service) {
}
exports.makeServiceUrl = makeServiceUrl;
function localCacheUrl(folder, service) {
var loc = window.location.href;
var windowLocation = window.location;
var loc = windowLocation.href;
var url = "/mapserver/" + folder + "/" + service;
if (loc.indexOf('transportal.cee.wisc.edu') > -1) {
if (loc.toLowerCase().indexOf('webmapsstage') > -1) {
......@@ -41,6 +42,9 @@ function localCacheUrl(folder, service) {
url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url;
}
}
else if (parseInt(windowLocation.port) !== 8081) {
url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url;
}
return url;
}
exports.localCacheUrl = localCacheUrl;
......
This diff is collapsed.
......@@ -23,7 +23,8 @@ export function makeServiceUrl(folder: string, service: string): string{
}
export function localCacheUrl(folder: string, service: string): string{
let loc = window.location.href;
let windowLocation = window.location;
let loc = windowLocation.href;
let url = `/mapserver/${folder}/${service}`;
......@@ -33,6 +34,8 @@ export function localCacheUrl(folder: string, service: string): string{
} else {
url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url
}
} else if (parseInt(windowLocation.port) !== 8081){
url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment