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

289 Search results now include CDTAs #1156

Merged
merged 1 commit into from
Mar 25, 2024
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
6 changes: 6 additions & 0 deletions app/components/map-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ export default Component.extend({
this.fitBounds(result.feature, 3);
}

if (result.type === 'cdta') {
selection.set('searchResultFeature', result.feature);
this.set('searchTerms', result.feature.properties.cdta2020);
this.fitBounds(result.feature, 3);
}

if (result.type === 'address') {
const center = result.coordinates;
selection.set('currentAddress', center);
Expand Down
4 changes: 4 additions & 0 deletions app/templates/components/map-search.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<h4 class="header-small">Neighborhoods</h4>
{{else if (eq type 'district')}}
<h4 class="header-small">Community Districts</h4>
{{else if (eq type 'cdta')}}
<h4 class="header-small">2020 Community District Tabulation Areas</h4>
{{else}}
<h4 class="header-small">Add Map Pin</h4>
{{/if}}
Expand All @@ -38,6 +40,8 @@
<span class="icon polygon large"></span>
{{else if (eq type 'district')}}
<span class="icon polygon large"></span>
{{else if (eq type 'cdta')}}
<span class="icon polygon large"></span>
{{else}}
{{fa-icon icon="map-pin"}}
{{/if}}
Expand Down
Loading