<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* debug/positions.html.twig */
class __TwigTemplate_3b48f469b7e26d502fec441b04552b57 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "debug/positions.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "debug/positions.html.twig"));
$this->parent = $this->load("base.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 4
yield "
<div class=\"page\">
<div class=\"container\">
<div class=\"row animated fadeIn delay-0-2s\">
<div class=\"col-12 mb-3 mb-lg-5\">
<div class=\"\">
<h2>All positions on ";
// line 10
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("now", "Y-m-d"), "html", null, true);
yield "</h2>
</div>
<hr></hr>
</div>
</div>
</div>
<div class=\"container pb-5\">
<div class=\"row\">
<div class=\"col-12\">
";
// line 20
if ((($tmp = (isset($context["positionGpsListArray"]) || array_key_exists("positionGpsListArray", $context) ? $context["positionGpsListArray"] : (function () { throw new RuntimeError('Variable "positionGpsListArray" does not exist.', 20, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 21
yield " <div class=\"animated fadeIn delay-0-8s\" style=\"width: 100%; height: 70vh;\" id=\"map\"></div>
";
} else {
// line 23
yield " <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
";
}
// line 25
yield " </div>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 32
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 33
yield " ";
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
<script>
\$(window).on('load', function() {
var positions = ";
// line 40
yield json_encode((isset($context["positionGpsListArray"]) || array_key_exists("positionGpsListArray", $context) ? $context["positionGpsListArray"] : (function () { throw new RuntimeError('Variable "positionGpsListArray" does not exist.', 40, $this->source); })()));
yield ";
initMap();
function initMap() {
//var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
var mapOptions = {
zoom: 16,
center: new google.maps.LatLng(positions[0][0],positions[0][1])
}
var map = new google.maps.Map(document.getElementById(\"map\"), mapOptions);
var markers = [];
positions.forEach(function(element) {
markers.push(new google.maps.Marker({
position: new google.maps.LatLng(element[0], element[1]),
title: element[2] + \" - \" + element[0] + \" - \" + element[1]
}));
});
// To add the marker to the map, call setMap();
//markers[0].setMap(map);
//marker2.setMap(map);
markers.forEach(function(element) {
element.setMap(map);
});
}
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "debug/positions.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 148 => 40, 137 => 33, 124 => 32, 108 => 25, 104 => 23, 100 => 21, 98 => 20, 85 => 10, 77 => 4, 64 => 3, 41 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'base.html.twig' %}
{% block body %}
<div class=\"page\">
<div class=\"container\">
<div class=\"row animated fadeIn delay-0-2s\">
<div class=\"col-12 mb-3 mb-lg-5\">
<div class=\"\">
<h2>All positions on {{ \"now\"|date(\"Y-m-d\") }}</h2>
</div>
<hr></hr>
</div>
</div>
</div>
<div class=\"container pb-5\">
<div class=\"row\">
<div class=\"col-12\">
{% if positionGpsListArray %}
<div class=\"animated fadeIn delay-0-8s\" style=\"width: 100%; height: 70vh;\" id=\"map\"></div>
{% else %}
<div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script>
\$(window).on('load', function() {
var positions = {{ positionGpsListArray|json_encode()|raw }};
initMap();
function initMap() {
//var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
var mapOptions = {
zoom: 16,
center: new google.maps.LatLng(positions[0][0],positions[0][1])
}
var map = new google.maps.Map(document.getElementById(\"map\"), mapOptions);
var markers = [];
positions.forEach(function(element) {
markers.push(new google.maps.Marker({
position: new google.maps.LatLng(element[0], element[1]),
title: element[2] + \" - \" + element[0] + \" - \" + element[1]
}));
});
// To add the marker to the map, call setMap();
//markers[0].setMap(map);
//marker2.setMap(map);
markers.forEach(function(element) {
element.setMap(map);
});
}
});
</script>
{% endblock %}", "debug/positions.html.twig", "/var/www/vhosts/webpro-developpement.fr/follow.webpro-developpement.fr/public/templates/debug/positions.html.twig");
}
}