Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make references relative #36

Merged
merged 6 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions comparemapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,16 @@
} */
</style>
<script>
var path_location = location.pathname.replace(/\/[^/]+$/, '');
// var path_location = location.pathname.replace(/\/[^/]+$/, '');
var path_location = location.pathname.replace(/\/[^/]*$/, '')
var dojoConfig = {
has: {
"esri-native-promise": true
},
parseOnLoad: true,
packages: [{
name: "mapdijit",
location: 'https://pedp-ejscreen.azurewebsites.net/mapdijit'
location: path_location + '/mapdijit'
}]
};
</script>
Expand Down Expand Up @@ -292,8 +293,8 @@
"dijit/TooltipDialog",
"dojo/dom-construct",
"esri/config",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/CompareMaps.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/sliderItem.js",
"./mapdijit/CompareMaps.js",
"./mapdijit/sliderItem.js",
"dojo/dom-attr",
"dijit/registry",
"dojo/domReady!"
Expand Down
14 changes: 8 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
***************************************************************************************************
/* **************************************************************************************************
* Title: EJScreen Home
* Description: The HTML page provides interactive tools for geographical and environmental data analysis,
* including map viewing with EJScreen and additional data,public space identification,
Expand All @@ -10,7 +10,7 @@
* Creation Date: 01/22/2024
* Last Updated: 01/22/2024

****************************************************************************************************
**************************************************************************************************** */
-->
<!DOCTYPE html>
<html>
Expand Down Expand Up @@ -84,7 +84,8 @@
<!-- End Google Tag Manager -->

<script>
var path_location = location.pathname.replace(/\/[^/]+$/, '');
// var path_location = location.pathname.replace(/\/[^/]+$/, '');
var path_location = location.pathname.replace(/\/[^/]*$/, '')
console.log(path_location)
var dojoConfig = {
has: {
Expand All @@ -93,7 +94,7 @@
parseOnLoad: true,
packages: [{
name: "mapdijit",
location: 'https://pedp-ejscreen.azurewebsites.net/mapdijit'
location: path_location + '/mapdijit'
}]
};

Expand Down Expand Up @@ -139,6 +140,7 @@
//$('#addremotemaps_label').append('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
//$('#moreDemographics_label').append('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
</script>
// <script src="."></script>
<script src="https://js.arcgis.com/4.20/"></script>
<script type="text/javascript" src="javascript/config.js"></script>
<script type="text/javascript" src="javascript/defaults.js"></script>
Expand Down Expand Up @@ -666,7 +668,7 @@ <h4 style="text-align: center;font-weight:bold">Welcome!</h4>
</td>
</tr>

<!-- <tr>
<tr>

<td>
<div id="thresholdMaps" class="divBtn" title="Overlay boundaries">
Expand All @@ -677,7 +679,7 @@ <h4 style="text-align: center;font-weight:bold">Welcome!</h4>
Threshold Map
</div>
</td>
</tr> -->
</tr>



Expand Down
5 changes: 3 additions & 2 deletions index_maintenance.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@


<script>
var path_location = location.pathname.replace(/\/[^/]+$/, '');
var path_location = location.pathname.replace(/\/[^/]*$/, '')
// var path_location = location.pathname.replace(/\/[^/]+$/, '');
var dojoConfig = {
has: {
"esri-native-promise": true
},
parseOnLoad: true,
packages: [{
name: "mapdijit",
location: 'https://pedp-ejscreen.azurewebsites.net/mapdijit'
location: path_location + '/mapdijit'
}]
};

Expand Down
3 changes: 2 additions & 1 deletion javascript/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var versionDetailed = "2.3.01"; //detailed version number for dev records, not e
var enableGoogleTagManager = true;


// require(["https://js.arcgis.com/4.20/esri/config"], function (esriConfig) {
require(["esri/config"], function (esriConfig) {
//Timeout in milliseconds for all esriRequests. Used for call to EJ services for reports.
esriConfig.request.timeout = 120000; //2 minutes
Expand Down Expand Up @@ -109,7 +110,7 @@ var glossaryurlSuppIndexes = "https://web.archive.org/web/20241202134502/https:/
//var glossaryurl = "https://www.epa.gov/ejscreen/glossary-ejscreen-terms";
//var glossaryurl = "https://ejscreen.epa.gov/ejscreen23/ejscreen-map-descriptions3.html";
var glossaryurl ="https://web.archive.org/web/20250123161322/https://www.epa.gov/ejscreen/ejscreen-map-descriptions";
var homeappurl = "https://pedp-ejscreen.azurewebsites.net";
// var homeappurl = "http://localhost:8000"; --SH--What is this used for?
var v1appurl = "ejscreen_v1/index.html";
var countybndurl =
"//geopub.epa.gov/arcgis/rest/services/EMEF/Boundaries/MapServer/5/query";
Expand Down
3 changes: 2 additions & 1 deletion javascript/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@
//of the application.
//ArcGIS.com. Enter link values for the link1 and link2 and text to add links. For example
//url:'http://www.esri.com',text:'Esri'
// url: homeappurl,
link1: {
url: homeappurl,
url: location.pathname.replace(/\/[^/]*$/, ''),
text: 'EJScreen Home'
},
link2: {
Expand Down
43 changes: 22 additions & 21 deletions javascript/layout_new.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// <reference path="../mapdijit/suggestlayers.js" />
/// <reference arcgisPath="https://js.arcgis.com/4.20/" />
require([
"dojo/parser",
"dojo/ready",
Expand Down Expand Up @@ -34,27 +35,27 @@ require([
"esri/tasks/support/IdentifyParameters",
"esri/widgets/Expand",
"esri/widgets/ScaleBar",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/MapEJIndexMod.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/Places.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/MapDemographics.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/ThresholdWidget.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/AddShapefile.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/TOC.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/Measure.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/ejChart.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/ejKnownGeo.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/EJreport.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/EJtable.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/SearchServices.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/SearchGISweb.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/IDinfoWindow.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/IDinfoWindowDemog.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/IDinfoWindowEJ.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/IDinfoWindowThreshold.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/EJSessions.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/SaveSessions.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/SuggestLayers.js",
"./mapdijit/MapEJIndexMod.js",
"./mapdijit/Places.js",
"./mapdijit/MapDemographics.js",
"./mapdijit/ThresholdWidget.js",
"./mapdijit/AddShapefile.js",
"./mapdijit/TOC.js",
"./mapdijit/Measure.js",
"./mapdijit/ejChart.js",
"./mapdijit/ejKnownGeo.js",
"./mapdijit/EJreport.js",
"./mapdijit/EJtable.js",
"./mapdijit/SearchServices.js",
"./mapdijit/SearchGISweb.js",
"./mapdijit/EJinfoWindow.js",
"./mapdijit/IDinfoWindow.js",
"./mapdijit/IDinfoWindowDemog.js",
"./mapdijit/IDinfoWindowEJ.js",
"./mapdijit/IDinfoWindowThreshold.js",
"./mapdijit/EJSessions.js",
"./mapdijit/SaveSessions.js",
"./mapdijit/SuggestLayers.js",
"dijit/layout/ContentPane",
"dojox/layout/FloatingPane",
"dijit/Toolbar",
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/AddShapefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ define(
"esri/Graphic",
"esri/layers/support/Field",
"esri/geometry/Polyline",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/IDinfoWindow.js"
"./mapdijit/IDinfoWindow.js"

],
function(
Expand Down
8 changes: 4 additions & 4 deletions mapdijit/CompareMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ define([
"esri/config",
"esri/request",
"esri/PopupTemplate",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/MapDemog.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/MapOther.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/ThresholdWidget.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/MapMore.js",
"./mapdijit/MapDemog.js",
"./mapdijit/MapOther.js",
"./mapdijit/ThresholdWidget.js",
"/mapdijit/MapMore.js",
"dojo/dom",
"dojo/domReady!",
], function (
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/EJSessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ define(
"esri/PopupTemplate",
"esri/Basemap",
"esri/renderers/support/jsonUtils",
'https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js'
'./mapdijit/EJinfoWindow.js'
],
function(
declare,
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/IDinfoWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(
"esri/layers/FeatureLayer",
"esri/Graphic",
"esri/PopupTemplate",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js"
"./mapdijit/EJinfoWindow.js"
],
function(
declare,
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/IDinfoWindowDemog.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(
"esri/layers/FeatureLayer",
"esri/Graphic",
"esri/PopupTemplate",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js"
"./mapdijit/EJinfoWindow.js"
],
function(
declare,
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/IDinfoWindowEJ.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(
"esri/layers/FeatureLayer",
"esri/Graphic",
"esri/PopupTemplate",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js"
"./mapdijit/EJinfoWindow.js"
],
function(
declare,
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/IDinfoWindowFips.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ define(
"esri/layers/FeatureLayer",
"esri/geometry/Point",
"esri/PopupTemplate",
'https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js',
'./mapdijit/EJinfoWindow.js',

],
function(
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/IDinfoWindowThreshold.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(
"esri/layers/FeatureLayer",
"esri/Graphic",
"esri/PopupTemplate",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js"
"./mapdijit/EJinfoWindow.js"
],
function(
declare,
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/MapEJIndexMod.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define([
"esri/layers/FeatureLayer",
"esri/layers/ImageryLayer",
"esri/layers/TileLayer",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/IDinfoWindow.js",
"./mapdijit/IDinfoWindow.js",
"esri/core/urlUtils",
"dijit/form/Button",
"dojo/domReady!",
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/Places.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ define([
"esri/layers/FeatureLayer",
"esri/layers/MapImageLayer",
"esri/layers/TileLayer",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/IDinfoWindow.js",
"./mapdijit/IDinfoWindow.js",
"esri/config",
"esri/tasks/QueryTask",
"esri/tasks/support/Query",
Expand Down
4 changes: 2 additions & 2 deletions mapdijit/TOC.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ define([
"esri/core/watchUtils",
"esri/widgets/Legend",
"esri/request",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/sliderItem.js",
"https://pedp-ejscreen.azurewebsites.net/mapdijit/DemogFilter.js",
"./mapdijit/sliderItem.js",
"./mapdijit/DemogFilter.js",
"dijit/TooltipDialog",
"dijit/form/Form",
"dijit/form/CheckBox",
Expand Down
13 changes: 10 additions & 3 deletions mapdijit/ejChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ define(['dojo/_base/declare',
'dojo/fx/Toggler',
'dojo/text!mapdijit/templates/ejChart.html',
"dojox/layout/FloatingPane",
'https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js',
"https://pedp-ejscreen.azurewebsites.net/mapdijit/IDinfoWindowFips.js",
'./mapdijit/EJinfoWindow.js',
"./mapdijit/IDinfoWindowFips.js",
'esri/widgets/Sketch/SketchViewModel',
"esri/tasks/QueryTask",
"esri/tasks/support/Query",
Expand Down Expand Up @@ -66,7 +66,14 @@ define(['dojo/_base/declare',
PopupTemplate,
Search,
move) {
var a = dojo.create("link", { type: "text/css", rel: "stylesheet", href: "https://pedp-ejscreen.azurewebsites.net/mapdijit/css/draw.css" });
var path_location = location.pathname.replace(/\/[^/]*$/, '')
var a = dojo.create("link", {
type: "text/css",
rel: "stylesheet",
href: path_location + '/mapdijit/css/draw.css'
});
// href: "http://localhost:8000/mapdijit/css/draw.css"

dojo.doc.getElementsByTagName("head")[0].appendChild(a);

// var pointsym = { // symbol used for points
Expand Down
2 changes: 1 addition & 1 deletion mapdijit/ejKnownGeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ define(['dojo/_base/declare',
"esri/Graphic",
"esri/geometry/Polygon",
"esri/PopupTemplate",
'https://pedp-ejscreen.azurewebsites.net/mapdijit/EJinfoWindow.js'
'./mapdijit/EJinfoWindow.js'
], function(
declare,
has,
Expand Down