More ruff fixes (#2)
* adding ruff auto check for pull requests as well as fixing all ruff errors * More ruff fixes: forgot half of the ruff checks Forgot to do a git add all :D --------- Co-authored-by: Kadir <git@k8n.dev>
This commit is contained in:
parent
4c23acdb55
commit
0801aaf200
14 changed files with 23 additions and 32 deletions
|
|
@ -195,18 +195,18 @@ export function Map(
|
|||
.call(xAxis);
|
||||
}
|
||||
|
||||
function openListingsDialog(longtitude: number, latitude: number) {
|
||||
function openListingsDialog(longitude: number, latitude: number) {
|
||||
const searchBuffer = 0.001 // ~100m
|
||||
const properties = heatmap._tree.search({
|
||||
minX: longtitude - searchBuffer,
|
||||
maxX: longtitude + searchBuffer,
|
||||
minX: longitude - searchBuffer,
|
||||
maxX: longitude + searchBuffer,
|
||||
minY: latitude - searchBuffer,
|
||||
maxY: latitude + searchBuffer
|
||||
})
|
||||
if (properties.length > 0) {
|
||||
const listingDialogPopup = getListingDialog(properties);
|
||||
new mapboxgl.Popup()
|
||||
.setLngLat([longtitude, latitude])
|
||||
.setLngLat([longitude, latitude])
|
||||
.setHTML(renderToString(listingDialogPopup))
|
||||
.setMaxWidth("500px")
|
||||
.addTo(mapRef.current);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue