Skip to content

Commit

Permalink
Merge branch '2.3.0' into pointid-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhpalp authored Jul 26, 2024
2 parents 97276fe + e24ef36 commit 8412db3
Showing 1 changed file with 41 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,41 @@ export class IncidentHeaderPanelComponent implements AfterViewInit, OnInit {

private map: any;

private perimeterLayer = esri.featureLayer({
url: this.appConfigService.getConfig()['externalAppConfig']['AGOLperimetres'].toString(),
ignoreRenderer: true,
precision: 3,
style: (feature) => ({
fillColor: '#e60000',
color: '#e60000',
weight: 2,
fillOpacity: 0.5
})
})

private evacOrdersLayer = esri.featureLayer({
url: this.appConfigService.getConfig()['externalAppConfig']['AGOLevacOrders'].toString(),
ignoreRenderer: true,
precision: 10,
style: (feature) => {
if (feature.properties.ORDER_ALERT_STATUS === 'Order') {
return {
fillColor: '#ff3a35',
color: '#ff3a35',
weight: 2.25,
fillOpacity: 0.5
};
} else if (feature.properties.ORDER_ALERT_STATUS === 'Alert') {
return {
fillColor: '#fa9600',
color: '#fa9600',
weight: 2.25,
fillOpacity: 0.5
};
}
}
})


constructor(
private appConfigService: AppConfigService,
Expand Down Expand Up @@ -256,42 +291,8 @@ export class IncidentHeaderPanelComponent implements AfterViewInit, OnInit {
['mapServices']['openmapsBaseUrl'].toString();

if (this.evac) {
esri.featureLayer({
url: this.appConfigService.getConfig()['externalAppConfig']['AGOLperimetres'].toString(),
ignoreRenderer: true,
precision: 3,
style: (feature) => ({
fillColor: '#e60000',
color: '#e60000',
weight: 2,
fillOpacity: 0.5
})
})
.addTo(this.map);

esri.featureLayer({
url: this.appConfigService.getConfig()['externalAppConfig']['AGOLevacOrders'].toString(),
ignoreRenderer: true,
precision: 10,
style: (feature) => {
if (feature.properties.ORDER_ALERT_STATUS === 'Order') {
return {
fillColor: '#ff3a35',
color: '#ff3a35',
weight: 2.25,
fillOpacity: 0.5
};
} else if (feature.properties.ORDER_ALERT_STATUS === 'Alert') {
return {
fillColor: '#fa9600',
color: '#fa9600',
weight: 2.25,
fillOpacity: 0.5
};
}
}
})
.addTo(this.map);
this.perimeterLayer.addTo(this.map);
this.evacOrdersLayer.addTo(this.map);
}

if (this.areaRestriction) {
Expand Down Expand Up @@ -451,6 +452,10 @@ export class IncidentHeaderPanelComponent implements AfterViewInit, OnInit {
fillColor: colorToDisplay,
}).addTo(this.map);
}

this.perimeterLayer.addTo(this.map);
this.evacOrdersLayer.addTo(this.map);

this.cdr.detectChanges();
}

Expand Down

0 comments on commit 8412db3

Please sign in to comment.