mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
zoom in country
This commit is contained in:
@@ -80,9 +80,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="w-1/2">
|
<div class="w-1/2">
|
||||||
@php
|
@php
|
||||||
|
$focus = '';
|
||||||
$map = $country->code . '_merc';
|
$map = $country->code . '_merc';
|
||||||
if (!\File::exists(public_path('vendor/jvector/maps/' . $country->code . '.js'))) {
|
if (!\File::exists(public_path('vendor/jvector/maps/' . $country->code . '.js'))) {
|
||||||
$map = 'europe_merc';
|
$map = 'europe_merc';
|
||||||
|
$focus = 'focusOn: {lat:'.$country->latitude.',lng:'.$country->longitude.',scale:8,animate:true},';
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
<div
|
<div
|
||||||
@@ -93,6 +95,7 @@
|
|||||||
let markers = {{ Js::from($markers) }};
|
let markers = {{ Js::from($markers) }};
|
||||||
|
|
||||||
$('#map').vectorMap({
|
$('#map').vectorMap({
|
||||||
|
{{ $focus }}
|
||||||
zoomButtons : false,
|
zoomButtons : false,
|
||||||
zoomOnScroll: true,
|
zoomOnScroll: true,
|
||||||
map: '{{ $map }}',
|
map: '{{ $map }}',
|
||||||
|
|||||||
Reference in New Issue
Block a user