mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
heatmap added
This commit is contained in:
@@ -181,19 +181,19 @@
|
||||
|
||||
<div class="rounded" wire:ignore>
|
||||
@map([
|
||||
'lat' => $bookCase->latitude,
|
||||
'lng' => $bookCase->longitude,
|
||||
'zoom' => 24,
|
||||
'markers' => [
|
||||
[
|
||||
'title' => $bookCase->title,
|
||||
'lat' => $bookCase->latitude,
|
||||
'lng' => $bookCase->longitude,
|
||||
'url' => 'https://gonoware.com',
|
||||
'icon' => asset('img/btc-logo-6219386_1280.png'),
|
||||
'icon_size' => [42, 42],
|
||||
],
|
||||
],
|
||||
'lat' => $bookCase->latitude,
|
||||
'lng' => $bookCase->longitude,
|
||||
'zoom' => 24,
|
||||
'markers' => [
|
||||
[
|
||||
'title' => $bookCase->title,
|
||||
'lat' => $bookCase->latitude,
|
||||
'lng' => $bookCase->longitude,
|
||||
'url' => 'https://gonoware.com',
|
||||
'icon' => asset('img/btc-logo-6219386_1280.png'),
|
||||
'icon_size' => [42, 42],
|
||||
],
|
||||
],
|
||||
])
|
||||
</div>
|
||||
|
||||
|
||||
34
resources/views/livewire/book-case/heatmap.blade.php
Normal file
34
resources/views/livewire/book-case/heatmap.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="bg-21gray flex flex-col h-screen justify-between">
|
||||
<livewire:frontend.header :country="$country"/>
|
||||
{{-- MAIN --}}
|
||||
<section class="w-full mb-12">
|
||||
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10">
|
||||
|
||||
<h1 class="font-bold dark:text-white">
|
||||
{{ __('Orange Pill Heatmap') }}
|
||||
</h1>
|
||||
|
||||
<div
|
||||
x-data="{
|
||||
data: @js($heatmap_data),
|
||||
init() {
|
||||
|
||||
const map = L.map($refs.map).setView([50.5, 30.5], 8);
|
||||
|
||||
L.tileLayer.provider('Stamen.Toner').addTo(map);
|
||||
|
||||
var heat = L.heatLayer(this.data, {
|
||||
blur: 5,
|
||||
minOpacity: 0.2,
|
||||
radius: 25,
|
||||
gradient: {0.4: '#FABE75', 0.65: '#F9A949', 1: '#F7931A'}
|
||||
}).addTo(map);
|
||||
}
|
||||
}"
|
||||
>
|
||||
<div x-ref="map" style="height: 70vh;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -82,6 +82,10 @@
|
||||
class="{{ request()->routeIs('bookCases.table.bookcases') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
|
||||
{{ __('Bookcases') }}
|
||||
</a>
|
||||
<a href="{{ route('bookCases.heatmap', ['country' => $c]) }}"
|
||||
class="{{ request()->routeIs('bookCases.heatmap') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300">
|
||||
{{ __('Heatmap') }}
|
||||
</a>
|
||||
<a href="https://openbookcase.de/" target="_blank"
|
||||
class="text-gray-400 mr-5 font-medium leading-6 hover:text-gray-300">
|
||||
{{ __('Submit new book case') }}
|
||||
|
||||
Reference in New Issue
Block a user