From 48d1c124192919924d6284423c42126ad6caf6a5 Mon Sep 17 00:00:00 2001 From: sanj <67624670+iodrift@users.noreply.github.com> Date: Thu, 21 Nov 2024 11:28:26 -0800 Subject: [PATCH] Auto-update: Thu Nov 21 11:28:26 PST 2024 --- sijapi/routers/gis.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sijapi/routers/gis.py b/sijapi/routers/gis.py index 3b5580d..2bda93c 100644 --- a/sijapi/routers/gis.py +++ b/sijapi/routers/gis.py @@ -6,6 +6,7 @@ Uses Postgres/PostGIS for location tracking (data obtained via the companion mob from fastapi import APIRouter, HTTPException, Query from fastapi.responses import HTMLResponse, JSONResponse import random +import math from pathlib import Path import traceback from staticmap import StaticMap, CircleMarker @@ -15,7 +16,6 @@ from typing import Union, List import folium from folium.plugins import HeatMap, MarkerCluster, Search from folium.plugins import Fullscreen, MiniMap, MousePosition, Geocoder, Draw, MeasureControl -from playwright.async_api import async_playwright from zoneinfo import ZoneInfo from dateutil.parser import parse as dateutil_parse from typing import Optional, List, Union @@ -138,9 +138,7 @@ Generate a heatmap for the given date range and save it as a PNG file. :return: The path where the PNG file was saved, or None if no locations found """ try: - from staticmap import StaticMap, CircleMarker - import math - + start_date = await dt(start_date) if end_date: end_date = await dt(end_date)