Skip to content

Commit

Permalink
update to latest jsapi
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryrobinson committed Jan 24, 2024
1 parent 710bae5 commit 79ebfb6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 62 deletions.
36 changes: 30 additions & 6 deletions js/OPLAN_3D_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.18/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.20/"></script>
<script src="https://js.arcgis.com/4.24/"></script>
<script>
require([
"esri/config",
Expand Down Expand Up @@ -104,6 +104,30 @@
config: dictionaryRendererConfig
});

var dictionaryRendererFieldMap_cm = {
sidc: "sidc_2525c",
status: "status",
echelon: "echelon",
additionalinformation: "additionalinformation",
combateffectiveness: "combateffectiveness",
operationalcondition: "operationalcondition",
higherformation: "higherFormation",
direction: "direction",
speed: "speed",
staffcomment: "staffComment",
type: "Type",
uniquedesignation: "uniquedesignation",
distance: "width",
z: "z",
z2: "z2"
};
var dictionaryRenderer2525c = new DictionaryRenderer({
url: "https://www.arcgis.com/sharing/rest/content/items/64d5c3d58a924cd98587fd80f9ec4ef1", // 2525c
//url: "https://www.arcgis.com/sharing/rest/content/items/75b40938249848dcaa7a9f3a8fec2895", //2525d latest
fieldMap: dictionaryRendererFieldMap_cm,
config: dictionaryRendererConfig
});

var popupTemplateUnits = {
title: "[{symbolset} ({identity_})] {symbolentity}",
content: [
Expand Down Expand Up @@ -289,7 +313,7 @@
renderer: dictionaryRenderer2525d
});

/* var layerControlMeasuresPoints = new FeatureLayer({
var layerControlMeasuresPoints = new FeatureLayer({
title: "Control Measures - Points",
url: "https://services.arcgis.com/pmcEyn9tLWCoX7Dm/ArcGIS/rest/services/Ft_Irwin_OPLAN/FeatureServer/21",
outFields: ["*"],
Expand All @@ -312,14 +336,14 @@
popupTemplate: popupTemplateCM,
renderer: dictionaryRenderer2525c
});
*/

//map.add(layerControlMeasuresLines);
//map.add(layerControlMeasuresAreas);

map.add(layerControlMeasuresLines);
map.add(layerControlMeasuresAreas);
map.add(layerUnits);
map.add(layerActivities);
map.add(layerAir);
//map.add(layerControlMeasuresPoints);
map.add(layerControlMeasuresPoints);


var spinning = false;
Expand Down
61 changes: 5 additions & 56 deletions js/monterey_2D_stream_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.16/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.16/"></script>
<script src="https://jsdev.arcgis.com/4.26/"></script>
<script>
var streamLayer;
require([
Expand All @@ -41,7 +41,7 @@
"esri/widgets/CoordinateConversion",
"esri/widgets/Fullscreen",
"esri/widgets/Feature"
], function(
], function(
esriConfig,
Portal,
Map,
Expand Down Expand Up @@ -85,29 +85,6 @@
sidc: "sidc_2525c",
speed: "Speed",
uniquedesignation: "uniquedesignation",
//combateffectiveness: "operationalcondition",
//staffcomment: "staffcomment",
//higherformation: "owningunit",
//additionalinformation: "Description",
//datetimevalid: "Date",
//distance: "Distance",
//commonidentifier: "commonidentifier",
//datetimeexpired: "datetimeexpired",
//equipmentteardowntime: "equipmentteardowntime",
//idmode: "idmode",
//platformtype: "platformtype",
//quantity: "quantity",
//reinforced: "reinforced",
//reliability: "reliability",
//credibility: "credibility",
//sigintmobility: "",
//targetdesignator: "TargetDesignator",
//type: "type",
//uniquedesignation2: "",
//x: "X",
//y: "Y",
//z: "Z",
//z2: ""
},
config: {
frame: "ON",
Expand All @@ -126,30 +103,8 @@
sidc: "sidc",
speed: "Speed",
uniquedesignation: "uniquedesignation",
//combateffectiveness: "operationalcondition",
//staffcomment: "staffcomment",
higherformation: "owningunit",
//additionalinformation: "Description",
//datetimevalid: "Date",
//distance: "Distance",
//commonidentifier: "commonidentifier",
//datetimeexpired: "datetimeexpired",
//equipmentteardowntime: "equipmentteardowntime",
//idmode: "idmode",
//platformtype: "platformtype",
//quantity: "quantity",
//reinforced: "reinforced",
//reliability: "reliability",
//credibility: "credibility",
//sigintmobility: "",
//targetdesignator: "TargetDesignator",
//type: "type",
//uniquedesignation2: "",
//x: "X",
//y: "Y",
//z: "Z",
//z2: ""
},
},
config: {
frame: "ON",
fill: "ON",
Expand Down Expand Up @@ -353,19 +308,13 @@
}
});

//streamLayerView.effect = {
// filter: {
// where: "status911 = " + 1,
// },
// includedEffect: "invert(100%)"
//};



streamLayerView.on("data-received", (event) => {

if (event.attributes["status911"]===1) {
console.log("Alert: " + event.attributes["uniquedesignation"]);
var highlightQuery = friendlyLandStreamLayer.createQuery();
var highlightQuery = friendlyLandStreamLayer.createQuery();
highlightQuery.where = "track_id='" + event.attributes["track_id"] + "'";
streamLayerView.queryFeatures(highlightQuery).then(function (response) {
streamLayerView.highlight(response.features);
Expand Down

0 comments on commit 79ebfb6

Please sign in to comment.