Skip to content

Commit

Permalink
reintroduces style switcher and adds types
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanAndrews300 committed Jan 10, 2025
1 parent 7c3848d commit eaf3666
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion src/components/MapStyleSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const MapStyleSwitcher: React.FC<MapStyleSwitcherProps> = ({
}) => {
const [activeStyle, setActiveStyle] = useState('DATAVIZ');
const [isHovered, setIsHovered] = useState(false);

type BaseMap = {
name: string;
img: string;
Expand Down
10 changes: 1 addition & 9 deletions src/components/PropertyMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,21 +467,13 @@ const PropertyMap: FC<PropertyMapProps> = ({
onError={(e) => {
console.log(e);
if (
e.message ===
e.error.cause ===
"The layer 'vacant_properties_tiles_polygons' does not exist in the map's style and cannot be queried for features."
)
setHasLoadingError(true);
}}
onLoad={(e) => {
setMap(e.target);
const attributionButton: HTMLElement | null = document.querySelector(
'.maplibregl-ctrl-attrib-button'
);
if (attributionButton) {
attributionButton.click();
} else {
console.warn('Attribution button not found.');
}
}}
onSourceData={(e) => {
handleSetFeatures(e);
Expand Down

0 comments on commit eaf3666

Please sign in to comment.