Skip to content

Commit

Permalink
Merge pull request #683 from jgrimes86/jgrimes86/629-limit-search-to-…
Browse files Browse the repository at this point in the history
…philly

629: Limit Search to Philadelphia
  • Loading branch information
nlebovits authored Jun 7, 2024
2 parents 930256b + 72e7fe9 commit 13ad161
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/PropertyMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,15 @@ const PropertyMap: FC<PropertyMapProps> = ({
const center = map.getCenter();
geocoderRef.current = new MapboxGeocoder({
accessToken: mapboxAccessToken,
bbox: [-75.288283,39.864114,-74.945063,40.140129],
filter: function (item) {
return item.context.some((i) => {
return (
(i.id.split('.').shift() === 'place' && i.text === 'Philadelphia') ||
(i.id.split('.').shift() === 'district' && i.text === 'Philadelphia County')
);
});
},
mapboxgl: mapboxgl,
marker: false,
proximity: {
Expand Down

0 comments on commit 13ad161

Please sign in to comment.