Skip to content

Commit

Permalink
Add marker
Browse files Browse the repository at this point in the history
  • Loading branch information
lil5 committed Jan 29, 2024
1 parent c93b975 commit 436e36b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/pages/FindChain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ export default function FindChain({ location }: { location: Location }) {
},
});

const _marker = new mapboxgl.Marker({
color: "#518d7e",
});

// Initalize chainsInView
_map.on("idle", () => {
getVisibleChains(_map, _chains);
Expand Down Expand Up @@ -268,6 +272,8 @@ export default function FindChain({ location }: { location: Location }) {
if (!e.clickOnLayer) {
setSidebarOpen(false);
}

_marker.setLngLat(e.lngLat).addTo(_map);
});

// zoom during click on a cluster
Expand Down

0 comments on commit 436e36b

Please sign in to comment.