generated from NYCPlanning/ae-remix-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter projects by ccd and highlight district
Add tiles filtering and district highlighting for ccd Use hasDistrict boolean in both layers Format Use empty array instead of empty string
- Loading branch information
Showing
5 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
app/components/layers/useCityCouncilDistrictLayer.client.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { GeoJsonLayer } from "@deck.gl/layers"; | ||
import { useParams } from "@remix-run/react"; | ||
|
||
export function useCityCouncilDistrictLayer() { | ||
const { cityCouncilDistrictId } = useParams(); | ||
const hasCityCouncilDistrict = cityCouncilDistrictId !== undefined; | ||
const data = hasCityCouncilDistrict | ||
? `${import.meta.env.VITE_ZONING_API_URL}/api/city-council-districts/${cityCouncilDistrictId}/geojson` | ||
: []; | ||
|
||
return new GeoJsonLayer({ | ||
id: "CityCouncilDistrict", | ||
data, | ||
visible: hasCityCouncilDistrict, | ||
filled: false, | ||
stroked: true, | ||
lineWidthUnits: "pixels", | ||
getLineWidth: 3, | ||
getLineColor: [49, 151, 149], | ||
}); | ||
} |
3 changes: 3 additions & 0 deletions
3
app/routes/city-council-districts.$cityCouncilDistrictId.capital-projects.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function CapitalProjectsByCityCouncilDistrictId() { | ||
return <></>; | ||
} |