refactor: remove unused point projection calculation in Map component

This commit is contained in:
2025-12-05 13:55:00 -05:00
parent 17cc85d177
commit 2873b02619

View File

@@ -65,7 +65,7 @@ const MapController = ({ selectedShop, isDiscoveryOpen }: { selectedShop: Coffee
const targetLng = selectedShop.lng; const targetLng = selectedShop.lng;
// Calculate offset if discovery panel is open and we're on desktop // Calculate offset if discovery panel is open and we're on desktop
let flyToOption = { const flyToOption = {
duration: 1.5, duration: 1.5,
easeLinearity: 0.25, easeLinearity: 0.25,
}; };
@@ -80,9 +80,6 @@ const MapController = ({ selectedShop, isDiscoveryOpen }: { selectedShop: Coffee
// Get current zoom // Get current zoom
const zoom = 16; const zoom = 16;
// Project the lat/lng to point
const point = map.project([targetLat, targetLng], zoom);
// Subtract offset (shift 'center' to the left, which moves 'view' to the right? Wait.) // Subtract offset (shift 'center' to the left, which moves 'view' to the right? Wait.)
// If we want the point to be at x + 200 (screen coords relative to center), // If we want the point to be at x + 200 (screen coords relative to center),
// we need the map center to be at x - 200 relative to point. // we need the map center to be at x - 200 relative to point.