diff --git a/public/explore/map/index.php b/public/explore/map/index.php index f822cbf..485ba83 100755 --- a/public/explore/map/index.php +++ b/public/explore/map/index.php @@ -16,8 +16,10 @@ try { } catch (Exception $e) { die("Error : ".$e->getMessage()); } +$req = $db->prepare('SELECT * FROM `records`'); +$req->execute(); +$result = $req->fetchAll(); ?> - @@ -25,10 +27,15 @@ try { Explore | Chiro - Canto - + + + + - + - \ No newline at end of file diff --git a/public/explore/map/scripts/map.js b/public/explore/map/scripts/map.js index e806e1a..69e2b3d 100755 --- a/public/explore/map/scripts/map.js +++ b/public/explore/map/scripts/map.js @@ -1,9 +1,13 @@ -var mymap = L.map('map').setView([51.505, -0.09], 13); -L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', { - attribution: 'Map data © OpenStreetMap contributors, Imagery © Mapbox', - maxZoom: 18, - id: 'mapbox/streets-v11', - tileSize: 512, - zoomOffset: -1, - accessToken: 'pk.eyJ1IjoidW5jbGVzYW11bHVzIiwiYSI6ImNrbXVmanF1bzEwd2Mybm82Nzlobm42bHAifQ.fKY7fUnY-MpzZUcseao0zg' -}).addTo(mymap); +var map = L.map('map').setView([0, 0], 13).setZoom(1); + +L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors' +}).addTo(map); + +for (let record of obs) { + L.circleMarker([record['lat'], record['lng']], { + radius: 2 + }).addTo(map).on("click", function (e) { + e.target.bindPopup(`${record['species']} recorded on ${record['date']} `); + }); +} diff --git a/public/explore/random/index.php b/public/explore/random/index.php index e26838a..3075256 100755 --- a/public/explore/random/index.php +++ b/public/explore/random/index.php @@ -52,7 +52,7 @@ include("$root/analytics/matomo.php"); - + diff --git a/public/explore/users/index.php b/public/explore/users/index.php new file mode 100644 index 0000000..b903e2c --- /dev/null +++ b/public/explore/users/index.php @@ -0,0 +1,68 @@ + PDO::ERRMODE_EXCEPTION + )); +} catch (Exception $e) { + die("Error : ".$e->getMessage()); +} + +$req = $db->prepare('SELECT * FROM `authors`'); +$req->execute(); +$result = $req->fetchAll(); +?> + + + + + + + Explore | Chiro - Canto + + + + + + +
+

Explore

+

Random Record

+ + + + + + + + + + + + + + + + + +
NameUsernamePrivate message link
message bubble
+
+ + + + \ No newline at end of file diff --git a/public/header.php b/public/header.php index 7903784..c3977cc 100755 --- a/public/header.php +++ b/public/header.php @@ -1,11 +1,11 @@
- -
\ No newline at end of file diff --git a/public/home/status.php b/public/home/status.php index 11eaae3..ff8204d 100755 --- a/public/home/status.php +++ b/public/home/status.php @@ -37,9 +37,11 @@ if ($data = $req->fetch()) { Taxa Available
of Free space
+ \ No newline at end of file diff --git a/public/media/icons/bubble.png b/public/media/icons/bubble.png new file mode 100644 index 0000000..21f62d3 Binary files /dev/null and b/public/media/icons/bubble.png differ diff --git a/public/menu.php b/public/menu.php index 2a0b708..59205e6 100755 --- a/public/menu.php +++ b/public/menu.php @@ -32,6 +32,9 @@
  • guano
  • + +
  • users
  • +
    diff --git a/public/styles/style.css b/public/styles/style.css index b02a487..e7a70c7 100755 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -614,4 +614,14 @@ article#guano { .spectro { -} \ No newline at end of file +} + +#map { + height: 50vh; + width: 50vw; +} + +i, .fa { + height: 0.1em; + color: black; +}