clickable markers

This commit is contained in:
Benjamin Takats
2022-12-15 15:24:42 +01:00
parent 4984adac00
commit ad657a54a9
3 changed files with 28 additions and 0 deletions

View File

@@ -10,6 +10,18 @@ class MeetupTable extends Component
{
public Country $country;
public function filterByMarker($id)
{
return to_route('meetup.table.meetup', [
'country' => $this->country->code,
'table' => [
'filters' => [
'byid' => $id,
],
]
]);
}
public function render()
{
// let markers = [{name: 'VAK', coords: [50.0091294, 9.0371812], status: 'closed', offsets: [0, 2]}];
@@ -23,6 +35,7 @@ class MeetupTable extends Component
fn($query) => $query->where('countries.code', $this->country->code))
->get()
->map(fn($meetup) => [
'id' => $meetup->id,
'name' => $meetup->name,
'coords' => [$meetup->city->latitude, $meetup->city->longitude],
])