mirror of
https://github.com/soconnor0919/lewisburg-coffee.git
synced 2026-02-04 23:56:32 -05:00
refactor: remove unused point projection calculation in Map component
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user