Skip to content

Commit

Permalink
Removing map onHover (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
avenmia authored Jan 24, 2024
1 parent 459ec20 commit 4d58d5d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/components/censusmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,9 @@ const CensusTractMap: NextPage = () => {
e.target._recordedStyle = selectedStyle;
});
layer.on("mouseover", (e: LeafletMouseEvent) => {
const featureProperties = feature.properties as FeatureProperties;
e.target
.setStyle({
fillOpacity: 0.5,
})
.bindPopup(
`Name: ${featureProperties["tractname"]} <br> Tract: ${featureProperties["name20"]} <br> Population: ${featureProperties["pop20"]}`,
{ autoPan: false }
)
.openPopup();
e.target.setStyle({
fillOpacity: 0.5,
});
});
layer.on("mouseout", (e: LeafletMouseEvent) => {
if (!geoJsonRef.current) {
Expand Down

1 comment on commit 4d58d5d

@vercel
Copy link

@vercel vercel bot commented on 4d58d5d Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hierr – ./

hierr.vercel.app
hierr-git-main-codeforhawaii.vercel.app
hierr-codeforhawaii.vercel.app

Please sign in to comment.