From 44343b5cff6ee8eeddc9100d5e57c58ed491f197 Mon Sep 17 00:00:00 2001 From: Sundog Date: Wed, 3 Jul 2024 10:52:10 -0400 Subject: [PATCH] first pass at POIs with items being on the map --- src/webserver/play/index.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/webserver/play/index.php b/src/webserver/play/index.php index fef77a8..adbcc37 100644 --- a/src/webserver/play/index.php +++ b/src/webserver/play/index.php @@ -102,6 +102,11 @@ height: 100%; text-align: center; } + .item-image { + position: relative; + width: 120px; + height: 120px; + } @@ -138,6 +143,11 @@ iconUrl: 'monster.svg', iconSize: [20, 20] }); + // generic item icon for now + var itemIcon = L.icon({ + iconUrl: 'item.svg', + iconSize: [20, 20] + }); function goToMapMode() { document.getElementById("ar-view").style.display = "none"; @@ -269,6 +279,22 @@ fetch("https://wander.reclaim.technology/webserver/api/me.php").then((response) query('SELECT pi.poi_id AS poi_id, pi.item_id AS item_id, p.name AS poi_name, p.latitude AS latitude, p.longitude AS longitude, p.description AS poi_description, i.name AS item_name, i.description AS item_description, p.map_marker_icon AS map_marker_icon FROM "POI-Items" pi JOIN POIs p ON pi.poi_id = p.id JOIN Items i ON pi.item_id = i.id WHERE p.is_active = 1 AND i.is_active = 1'); + if ($poi_item_results) { + while ($poi_item = $poi_item_results->fetchArray()) { + ?> + + " position="0 0 0" rotation="0 0 0"> + ;"> + + +