countries added

This commit is contained in:
Benjamin Takats
2022-12-17 19:01:48 +01:00
parent 45355b42bb
commit 74f5d41253
2 changed files with 14 additions and 2 deletions

View File

@@ -79,6 +79,12 @@
</div>
</div>
<div class="w-1/2">
@php
$map = $country->code . '_merc';
if (!\File::exists(public_path('vendor/jvector/maps/' . $country->code . '.js'))) {
$map = 'europe_merc';
}
@endphp
<div
wire:ignore
class="w-full flex justify-center"
@@ -90,7 +96,7 @@
$('#map').vectorMap({
zoomButtons : false,
zoomOnScroll: true,
map: '{{ $country->code }}_merc',
map: '{{ $map }}',
backgroundColor: 'transparent',
markers: markers.map(function(h){ return {name: h.name, latLng: h.coords} }),
onMarkerClick: function(event, index) {

View File

@@ -12,6 +12,12 @@
</h1>
<p class="px-0 mb-6 text-lg text-gray-600 md:text-xl lg:px-24"> Finde Bitcoiner in deiner Stadt und lerne
sie auf einem der Meetups kennen. </p>
@php
$map = $country->code . '_merc';
if (!\File::exists(public_path('vendor/jvector/maps/' . $map . '.js'))) {
$map = 'europe-merc';
}
@endphp
<div
wire:ignore
class="w-full flex justify-center"
@@ -22,7 +28,7 @@
$('#map').vectorMap({
zoomButtons : false,
zoomOnScroll: true,
map: '{{ $country->code }}_merc',
map: '{{ $map }}',
backgroundColor: 'transparent',
markers: markers.map(function(h){ return {name: h.name, latLng: h.coords} }),
onMarkerClick: function(event, index) {