Blocks, block groups, and VTDs get their ID / GEOID from their Census FIPS code, where the first two digits represent their state and the next three digits represent their county.
While in county paint mode, we can select all blocks/VTDs in the same county by this prefix.
Because this uses queryRenderedFeatures, it will not catch blocks outside the current view.
This makes assumptions, and if this is wrong I should change it, or enable/disable county paint on specific maps:
the county layer is consistent between maps and always has COUNTYFP
the paintable features always have an 'id' property with update: first 5 digits in the string being the FIPS code ~the format 'vtd:42123....'~
the paintable features are always blocks, block groups, or US Census VTDs (which we've confirmed do not cross counties)
Blocks, block groups, and VTDs get their ID / GEOID from their Census FIPS code, where the first two digits represent their state and the next three digits represent their county.
While in county paint mode, we can select all blocks/VTDs in the same county by this prefix. Because this uses
queryRenderedFeatures
, it will not catch blocks outside the current view.This makes assumptions, and if this is wrong I should change it, or enable/disable county paint on specific maps:
Update: removed turf from dependencies