GET https://stephen-nurse.com/todolist_items/edit/389

ToDoListItemsController :: edit

Request

GET Parameters

None

POST Parameters

None

Uploaded Files

None

Request Attributes

Key Value
_controller
"App\Controller\ToDoListItemsController::edit"
_firewall_context
"security.firewall.map.context.main"
_route
"to_do_list_items_edit"
_route_params
[
  "id" => "389"
]
_security_firewall_run
"_security_main"
_stopwatch_token
"344f82"
id
"389"
toDoListItem
App\Entity\ToDoListItems {#1022
  -id: 389
  -project: Proxies\__CG__\App\Entity\ToDoList {#1200 …}
  -status: "Complete"
  -priority: 56.0
  -task: "<p><strong>Maps</strong></p><p>To calculate the optimal zoom level for a Google Map that just fits all of your venues without scrolling, you need to determine the <strong>bounding box</strong> that encompasses all the venue locations. Based on the bounding box, you can compute the zoom level that ensures all the venues are visible. Here’s how you can approach this:</p><h3><strong>Steps to Calculate Optimal Zoom Level</strong></h3><p><strong>Find the bounding box</strong>:<br>For all your venues, compute the <strong>min and max latitudes</strong> and <strong>min and max longitudes</strong>:</p><ul><li>minLat = minimum latitude of all venues</li><li>maxLat = maximum latitude of all venues</li><li>minLng = minimum longitude of all venues</li><li>maxLng = maximum longitude of all venues</li></ul><p><strong>Calculate the geographical range</strong>:</p><ul><li>The <strong>latitude range</strong> is:<br>latRange = maxLat - minLat</li><li>The <strong>longitude range</strong> is:<br>lngRange = maxLng - minLng</li></ul><p><strong>Calculate the center of the map</strong>:<br>The center of the map is simply the average of the latitudes and longitudes:</p><ul><li>centerLat = (maxLat + minLat) / 2</li><li>centerLng = (maxLng + minLng) / 2</li></ul><p><strong>Calculate the diagonal distance</strong>: The diagonal distance between the top-left and bottom-right corners of the bounding box is critical for determining the zoom level. You can use the <strong>Haversine formula</strong> or a simplified approximation to compute the distance.</p><p>The Haversine formula is:</p><ol><li>a = sin²(Δφ/2) + cos(φ1) ⋅ cos(φ2) ⋅ sin²(Δλ/2) c = 2 ⋅ atan2(√a, √(1−a)) d = R ⋅ c</li></ol><p>Where:</p><ul><li>Δφ = difference in latitude (in radians)</li><li>Δλ = difference in longitude (in radians)</li><li>φ1, φ2 = latitude values in radians</li><li>R = radius of the Earth (mean radius = 6,371 km)</li><li>d = the distance between the two points (diagonal distance)</li></ul><p><strong>Estimate zoom level</strong>:<br>Based on the diagonal distance, Google Maps provides a rough way to estimate the zoom level, which is typically from 0 (world) to 21 (street level). A common approach is to map the diagonal distance to zoom levels using a <strong>logarithmic scale</strong>, but this depends on the map's current bounds and the projection used. Generally, a simplified formula is:</p><ol><li>zoomLevel = maxZoom - log(d / maxDistance) * scaleFactor<ul><li>maxZoom = the maximum zoom level allowed (usually 21)</li><li>maxDistance = the maximum diagonal distance you want to show (e.g., distance across your entire map's viewable range)</li><li>scaleFactor adjusts for the desired map fit</li></ul></li></ol><h3><strong>Using Google Maps API to Simplify</strong>:</h3><p>You can simplify this calculation by using the Google Maps API, which has a method to fit markers within a viewport using fitBounds():</p><p>// Assuming you have an array of venue locations in {lat, lng} format: const locations = [ &nbsp;{lat: 40.748817, lng: -73.985428}, &nbsp;{lat: 40.748217, lng: -73.985128}, &nbsp;// Add other venues here ]; // Create a bounds object const bounds = new google.maps.LatLngBounds(); // Extend bounds to include each venue locations.forEach(location =&gt; { &nbsp;bounds.extend(new google.maps.LatLng(location.lat, location.lng)); }); // Create a map with the bounds set const map = new google.maps.Map(document.getElementById("map"), { &nbsp;center: bounds.getCenter(), &nbsp;// Center map at the average of the venues &nbsp;zoom: 15 &nbsp;// You can let Google automatically choose the zoom or set a default }); // Fit map to the bounds map.fitBounds(bounds);</p><p>This method will automatically adjust the zoom level and center based on your venues, ensuring all the locations are visible without scrolling. You don't need to manually calculate the zoom level if you're using this approach.</p>"
  -hoursAllocated: null
  -immediatePriority: "Top Priority"
  -attachment: null
  -needsResearch: "No"
  -lastSaved: null
}

Request Headers

Header Value
accept
"*/*"
accept-encoding
"gzip, br, zstd, deflate"
cookie
"PHPSESSID=9vj07rl596ga77murc3fde89l2"
host
"stephen-nurse.com"
user-agent
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
x-php-ob-level
"1"

Request Content

Request content not available (it was retrieved as a resource).

Response

Response Headers

Header Value
cache-control
"no-cache, private"
content-type
"text/html; charset=UTF-8"
date
"Wed, 18 Jun 2025 09:36:28 GMT"
x-debug-token
"6ebad9"

Cookies

Request Cookies

Key Value
PHPSESSID
"9vj07rl596ga77murc3fde89l2"

Response Cookies

No response cookies

Session 3

Session Metadata

Key Value
Created
"Wed, 18 Jun 25 09:36:27 +0000"
Last used
"Wed, 18 Jun 25 09:36:28 +0000"
Lifetime
15000

Session Attributes

Attribute Value
_csrf/https-delete193
"v6teDfy29m1XQJFv2EcnFx1EATCrP7p8qNOzcJsHNEU"
_csrf/https-delete227
"e_6XAGfdcm4RZnEYrpvpJh-3EN4JINeQ6o-1ysvt0gI"
_csrf/https-to_do_list_items
"5HWfGewv_13ThksBTFIvtSJ4thIZ5e5TRtJZ5V80aWY"

Session Usage

3 Usages
Stateless check enabled
Usage
Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage:41
[
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php"
    "line" => 41
    "function" => "getMetadataBag"
    "class" => "Symfony\Component\HttpFoundation\Session\Session"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/security-bundle/Security.php"
    "line" => 99
    "function" => "getToken"
    "class" => "Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/security-bundle/Security.php"
    "line" => 81
    "function" => "getToken"
    "class" => "Symfony\Bundle\SecurityBundle\Security"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/src/Controller/ToDoListItemsController.php"
    "line" => 121
    "function" => "getUser"
    "class" => "Symfony\Bundle\SecurityBundle\Security"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/HttpKernel.php"
    "line" => 181
    "function" => "edit"
    "class" => "App\Controller\ToDoListItemsController"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/HttpKernel.php"
    "line" => 76
    "function" => "handleRaw"
    "class" => "Symfony\Component\HttpKernel\HttpKernel"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/Kernel.php"
    "line" => 197
    "function" => "handle"
    "class" => "Symfony\Component\HttpKernel\HttpKernel"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/public/index.php"
    "line" => 20
    "function" => "handle"
    "class" => "Symfony\Component\HttpKernel\Kernel"
    "type" => "->"
  ]
]
Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage:79
[
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php"
    "line" => 79
    "function" => "has"
    "class" => "Symfony\Component\HttpFoundation\Session\Session"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/security-csrf/CsrfTokenManager.php"
    "line" => 69
    "function" => "hasToken"
    "class" => "Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php"
    "line" => 82
    "function" => "getToken"
    "class" => "Symfony\Component\Security\Csrf\CsrfTokenManager"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/ResolvedFormType.php"
    "line" => 134
    "function" => "finishView"
    "class" => "Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php"
    "line" => 95
    "function" => "finishView"
    "class" => "Symfony\Component\Form\ResolvedFormType"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/ResolvedFormType.php"
    "line" => 128
    "function" => "finishView"
    "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php"
    "line" => 95
    "function" => "finishView"
    "class" => "Symfony\Component\Form\ResolvedFormType"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/Form.php"
    "line" => 908
    "function" => "finishView"
    "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/src/Controller/ToDoListItemsController.php"
    "line" => 161
    "function" => "createView"
    "class" => "Symfony\Component\Form\Form"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/HttpKernel.php"
    "line" => 181
    "function" => "edit"
    "class" => "App\Controller\ToDoListItemsController"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/HttpKernel.php"
    "line" => 76
    "function" => "handleRaw"
    "class" => "Symfony\Component\HttpKernel\HttpKernel"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/Kernel.php"
    "line" => 197
    "function" => "handle"
    "class" => "Symfony\Component\HttpKernel\HttpKernel"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/public/index.php"
    "line" => 20
    "function" => "handle"
    "class" => "Symfony\Component\HttpKernel\Kernel"
    "type" => "->"
  ]
]
Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage:69
[
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php"
    "line" => 69
    "function" => "set"
    "class" => "Symfony\Component\HttpFoundation\Session\Session"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/security-csrf/CsrfTokenManager.php"
    "line" => 74
    "function" => "setToken"
    "class" => "Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php"
    "line" => 82
    "function" => "getToken"
    "class" => "Symfony\Component\Security\Csrf\CsrfTokenManager"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/ResolvedFormType.php"
    "line" => 134
    "function" => "finishView"
    "class" => "Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php"
    "line" => 95
    "function" => "finishView"
    "class" => "Symfony\Component\Form\ResolvedFormType"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/ResolvedFormType.php"
    "line" => 128
    "function" => "finishView"
    "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php"
    "line" => 95
    "function" => "finishView"
    "class" => "Symfony\Component\Form\ResolvedFormType"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/form/Form.php"
    "line" => 908
    "function" => "finishView"
    "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/src/Controller/ToDoListItemsController.php"
    "line" => 161
    "function" => "createView"
    "class" => "Symfony\Component\Form\Form"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/HttpKernel.php"
    "line" => 181
    "function" => "edit"
    "class" => "App\Controller\ToDoListItemsController"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/HttpKernel.php"
    "line" => 76
    "function" => "handleRaw"
    "class" => "Symfony\Component\HttpKernel\HttpKernel"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/vendor/symfony/http-kernel/Kernel.php"
    "line" => 197
    "function" => "handle"
    "class" => "Symfony\Component\HttpKernel\HttpKernel"
    "type" => "->"
  ]
  [
    "file" => "/var/www/html/stephennurse/public/index.php"
    "line" => 20
    "function" => "handle"
    "class" => "Symfony\Component\HttpKernel\Kernel"
    "type" => "->"
  ]
]

Flashes

Flashes

No flash messages were created.

Server Parameters

Server Parameters

Defined in .env

Key Value
APP_ENV
"dev"
APP_SECRET
"ec48582a7659a570fb0293b8684e20b9"
APP_SERVER
"live"
APP_TIMEZONE
"Europe/London"
DATABASE_URL
"mysql://stephen:Descartes99@localhost:3306/stephennurse"
GOOGLE_MAP_API
"AIzaSyBIMNeOCE1pdTZu8p-7dSXhIUmpYhWzydc"
MAILER_DSN
"smtp://stephen@stephen-nurse.com:MycatiscalledRoger1936@ns0.ovh.net:465"

Defined as regular env variables

Key Value
APP_DEBUG
"1"
CONTEXT_DOCUMENT_ROOT
"/var/www/html/stephennurse/public"
CONTEXT_PREFIX
""
DOCUMENT_ROOT
"/var/www/html/stephennurse/public"
GATEWAY_INTERFACE
"CGI/1.1"
HTTPS
"on"
HTTP_ACCEPT
"*/*"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_COOKIE
"PHPSESSID=9vj07rl596ga77murc3fde89l2"
HTTP_HOST
"stephen-nurse.com"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
PHP_SELF
"/index.php"
QUERY_STRING
""
REDIRECT_HTTPS
"on"
REDIRECT_SSL_TLS_SNI
"stephen-nurse.com"
REDIRECT_STATUS
"200"
REDIRECT_URL
"/todolist_items/edit/389"
REMOTE_ADDR
"216.73.216.14"
REMOTE_PORT
"59059"
REQUEST_METHOD
"GET"
REQUEST_SCHEME
"https"
REQUEST_TIME
1750239388
REQUEST_TIME_FLOAT
1750239388.3481
REQUEST_URI
"/todolist_items/edit/389"
SCRIPT_FILENAME
"/var/www/html/stephennurse/public/index.php"
SCRIPT_NAME
"/index.php"
SERVER_ADDR
"54.36.163.14"
SERVER_ADMIN
"[no address given]"
SERVER_NAME
"stephen-nurse.com"
SERVER_PORT
"443"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SIGNATURE
"<address>Apache/2.4.52 (Ubuntu) Server at stephen-nurse.com Port 443</address>\n"
SERVER_SOFTWARE
"Apache/2.4.52 (Ubuntu)"
SSL_TLS_SNI
"stephen-nurse.com"
SYMFONY_DOTENV_VARS
"APP_ENV,APP_SERVER,APP_SECRET,DATABASE_URL,MAILER_DSN,GOOGLE_MAP_API,APP_TIMEZONE"