Skip to content

Commit

Permalink
Merge branch 'main' into julee/fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jjstnlee authored Nov 25, 2024
2 parents 6c9e074 + ef7a78e commit 8541719
Show file tree
Hide file tree
Showing 17 changed files with 739 additions and 431 deletions.
26 changes: 21 additions & 5 deletions api/maps/AddMarkers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function AddMarker({
document.title = 'ACE NY';
}
};

/*
function euclideanDistance(point1: number[], point2: number[]): number {
const [x1, y1] = point1;
const [x2, y2] = point2;
Expand Down Expand Up @@ -89,7 +89,7 @@ export default function AddMarker({
}
return mapZoom;
};

*/
const clusterer = useMemo(() => {
if (!map) return null;

Expand All @@ -110,9 +110,25 @@ export default function AddMarker({
},
};

const setClusterer = new MarkerClusterer({ map, renderer });
const clusterHandler = (
event: google.maps.MapMouseEvent,
cluster: Cluster,
map: google.maps.Map,
) => {
if (event.latLng) {
const mapZoom = (map.getZoom() ?? 0) + 3;
map.setCenter(event.latLng);
map.setZoom(mapZoom);
}
};

setClusterer.addListener('click', function (cluster: Cluster) {
const setClusterer = new MarkerClusterer({
map,
renderer,
onClusterClick: clusterHandler,
});

/*setClusterer.addListener('click', function (cluster: Cluster) {
const mapZoom = map.getZoom() ?? 0;
const minZoom = getMinZoom(cluster, mapZoom);
Expand All @@ -122,7 +138,7 @@ export default function AddMarker({
idleListener.remove();
});
}
});
});*/

return setClusterer;
}, [map]);
Expand Down
Binary file modified api/webscraper/__pycache__/database_constants.cpython-312.pyc
Binary file not shown.
Binary file modified api/webscraper/__pycache__/nyiso_scraper.cpython-312.pyc
Binary file not shown.
Binary file modified api/webscraper/__pycache__/nyserda_scraper.cpython-312.pyc
Binary file not shown.
Loading

0 comments on commit 8541719

Please sign in to comment.