From 6d30131f2c3483578f1332f2078b4a9315a21254 Mon Sep 17 00:00:00 2001 From: pac7 <47831526-pac7@users.noreply.replit.com> Date: Mon, 22 Sep 2025 15:20:45 +0000 Subject: [PATCH] Improve park detail page map display for better user experience Refactor park detail template to use data attributes on the map div for latitude, longitude, and park name, simplifying map initialization and handling missing location data gracefully. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 48ecdb60-d0f0-4b75-95c9-34e409ef35fb Replit-Commit-Checkpoint-Type: intermediate_checkpoint --- .replit | 4 ++++ templates/parks/park_detail.html | 35 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.replit b/.replit index 3520ba63..3a20e06b 100644 --- a/.replit +++ b/.replit @@ -62,6 +62,10 @@ externalPort = 3000 localPort = 45245 externalPort = 3001 +[[ports]] +localPort = 46519 +externalPort = 3002 + [deployment] deploymentTarget = "autoscale" run = [ diff --git a/templates/parks/park_detail.html b/templates/parks/park_detail.html index dbc554aa..cf37da26 100644 --- a/templates/parks/park_detail.html +++ b/templates/parks/park_detail.html @@ -186,7 +186,19 @@ {% if park.location.exists %}

Location

-
+ {% with location=park.location.first %} + {% if location.latitude is not None and location.longitude is not None %} +
+ {% else %} +
+ +

Location information not available

+
+ {% endif %} + {% endwith %}
{% endif %} @@ -262,22 +274,13 @@ - -{% with location=park.location.first %} -{% if location.latitude and location.longitude %} - - {% endif %} -{% endwith %} -{% endif %} {% endblock %}