Skip to content

Commit

Permalink
try case insentive url accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Mar 18, 2024
1 parent ef0c419 commit ee7ba00
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,24 @@ function clickInsideElement(e, className) {
return false;
}


function getUrlVars() {
var vars = {};
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(
m,
key,
value,
) {
vars[key.toLowerCase()] = value;
});

return {
get: function(paramName) {
return vars[paramName.toLowerCase()];
}
};
}
/**
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(
Expand All @@ -354,7 +372,7 @@ function getUrlVars() {
});
return vars;
}

*/
function ImageFeaturesToVieweportFeatures(viewer, geometries) {
const rs = {
type: 'FeatureCollection',
Expand Down

0 comments on commit ee7ba00

Please sign in to comment.