ECHO PARK NC and NC VALLEY VILLAGE are classified as MultiPolygons and won't zoom in when searched for in the Address Search. I found this section of geoUtils.js that filters out the two MultiPolygon NCs since they weren't working with booleanPointInPolygon.
Changes Made
booleanPointInPolygon can take a polygon or multipolygon, but the feature type needs to be specified. We can use a for loop with a conditional so we can use either polygon(feature.geometry.coordinates) or multiPolygon(feature.geometry.coordinates) with booleanPointInPolygon.
With the change I checked an address in Echo Park (1226 N Alvarado, Los Angeles, CA 90026), one in Valley Village (5000 Colfax Avenue, Valley Village, CA 91607), and one outside of either of those NCs, and they all zoomed in properly. (The addresses in Echo Park and Valley Village do not zoom in with the current codebase without this fix).
Fixes #1540
Info
ECHO PARK NC
andNC VALLEY VILLAGE
are classified as MultiPolygons and won't zoom in when searched for in the Address Search. I found this section of geoUtils.js that filters out the twoMultiPolygon
NCs since they weren't working withbooleanPointInPolygon
.Changes Made
booleanPointInPolygon
can take a polygon or multipolygon, but the feature type needs to be specified. We can use a for loop with a conditional so we can use eitherpolygon(feature.geometry.coordinates)
ormultiPolygon(feature.geometry.coordinates)
withbooleanPointInPolygon
.With the change I checked an address in Echo Park (1226 N Alvarado, Los Angeles, CA 90026), one in Valley Village (5000 Colfax Avenue, Valley Village, CA 91607), and one outside of either of those NCs, and they all zoomed in properly. (The addresses in Echo Park and Valley Village do not zoom in with the current codebase without this fix).
Pre-merge Checklist
main
branchAny questions? See the getting started guide