From 815bd5e2a828a867a80195717ddcf404c7ce5c4e Mon Sep 17 00:00:00 2001 From: Matt Gardner Date: Tue, 26 Oct 2021 23:51:58 -0500 Subject: [PATCH] For intersecting layers component, infers intersection from static property on lot model rather than on-the-fly spatial intersection --- app/adapters/lot.js | 3 + .../tax-lot/intersecting-layers-views.js | 3 - app/models/map-features/lot.js | 6 ++ .../tax-lot/intersecting-layers-views.hbs | 83 ++++++++++--------- 4 files changed, 52 insertions(+), 43 deletions(-) diff --git a/app/adapters/lot.js b/app/adapters/lot.js index 5bf72f197..6c2103e5d 100644 --- a/app/adapters/lot.js +++ b/app/adapters/lot.js @@ -12,6 +12,9 @@ const LotColumnsSQL = [ 'condono', 'council', 'firecomp', + 'firm07_fla', + 'edesignum', + 'pfirm15_fl', 'histdist', 'landmark', 'landuse', diff --git a/app/components/layer-record-views/tax-lot/intersecting-layers-views.js b/app/components/layer-record-views/tax-lot/intersecting-layers-views.js index 7806d95da..10b42772d 100644 --- a/app/components/layer-record-views/tax-lot/intersecting-layers-views.js +++ b/app/components/layer-record-views/tax-lot/intersecting-layers-views.js @@ -10,10 +10,7 @@ export default class IntersectingLayersViews extends Component { 'waterfront_access_plan', 'coastal_zone_boundary', 'lower_density_growth_management_areas', - 'floodplain_firm2007', - 'floodplain_pfirm2015', 'mandatory_inclusionary_housing', - 'e_designations', 'upland_waterfront_areas', 'appendixj_designated_mdistricts', ]; diff --git a/app/models/map-features/lot.js b/app/models/map-features/lot.js index bf46de77b..467b69699 100644 --- a/app/models/map-features/lot.js +++ b/app/models/map-features/lot.js @@ -337,8 +337,14 @@ export default class LotFragment extends MF.Fragment { @attr('string') council; + @attr('string') edesignum; + @attr('string') firecomp; + @attr('string') firm07_fla; + + @attr('string') pfirm15_fl; + @attr('string') histdist; @attr('string') landmark; diff --git a/app/templates/components/layer-record-views/tax-lot/intersecting-layers-views.hbs b/app/templates/components/layer-record-views/tax-lot/intersecting-layers-views.hbs index 67694c9dd..68b9a431f 100644 --- a/app/templates/components/layer-record-views/tax-lot/intersecting-layers-views.hbs +++ b/app/templates/components/layer-record-views/tax-lot/intersecting-layers-views.hbs @@ -13,6 +13,48 @@ {{/if}} +{{#if this.model.firm07_fla}} +
  • + + {{fa-icon "external-link-alt" transform="shrink-3 up-1"}} + Flood Zone + + + Effective Flood Insurance Rate Maps 2007 + +
  • +{{/if}} + +{{#if this.model.pfirm15_fl}} +
  • + + {{fa-icon "external-link-alt" transform="shrink-3 up-1"}} + Flood Zone + + + Preliminary Flood Insurance Rate Maps 2015 + +
  • +{{/if}} + +{{#if this.model.edesignum}} +
  • + + {{fa-icon "external-link-alt" transform="shrink-3 up-1"}} + Environmental Designation + +
  • +{{/if}} + {{/if}} - {{#if layers.floodplain_firm2007}} -
  • - - {{fa-icon "external-link-alt" transform="shrink-3 up-1"}} - Flood Zone - - - Effective Flood Insurance Rate Maps 2007 - -
  • - {{/if}} - {{#if layers.floodplain_pfirm2015}} -
  • - - {{fa-icon "external-link-alt" transform="shrink-3 up-1"}} - Flood Zone - - - Preliminary Flood Insurance Rate Maps 2015 - -
  • - {{/if}} {{#if layers.mandatory_inclusionary_housing}}
  • {{/if}} - {{#if layers.e_designations}} -
  • - - {{fa-icon "external-link-alt" transform="shrink-3 up-1"}} - Environmental Designation - -
  • - {{/if}} {{#if layers.appendixj_designated_mdistricts}}
  • {{/if}} - {{#unless (or numberIntersecting this.model.histdist)}} + {{#unless (or numberIntersecting this.model.histdist this.model.firm07_fla this.model.pfirm15_fl this.model.edesignum)}} None found {{/unless}}