var/cache/dev/twig/b2/b22c06ef6ada428d5432ce17029104f4.php line 54

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* debug/positions.html.twig */
  16. class __TwigTemplate_3b48f469b7e26d502fec441b04552b57 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'body' => [$this'block_body'],
  29.             'javascripts' => [$this'block_javascripts'],
  30.         ];
  31.     }
  32.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33.     {
  34.         // line 1
  35.         return "base.html.twig";
  36.     }
  37.     protected function doDisplay(array $context, array $blocks = []): iterable
  38.     {
  39.         $macros $this->macros;
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""debug/positions.html.twig"));
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""debug/positions.html.twig"));
  44.         $this->parent $this->load("base.html.twig"1);
  45.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 3
  52.     /**
  53.      * @return iterable<null|scalar|\Stringable>
  54.      */
  55.     public function block_body(array $context, array $blocks = []): iterable
  56.     {
  57.         $macros $this->macros;
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  62.         // line 4
  63.         yield "
  64.     <div class=\"page\">
  65.         <div class=\"container\">
  66.             <div class=\"row animated fadeIn delay-0-2s\">
  67.                 <div class=\"col-12 mb-3 mb-lg-5\">
  68.                     <div class=\"\">
  69.                         <h2>All positions on ";
  70.         // line 10
  71.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("now""Y-m-d"), "html"nulltrue);
  72.         yield "</h2>
  73.                     </div>
  74.                     <hr></hr>
  75.                 </div>
  76.             </div>
  77.         </div>
  78.         <div class=\"container pb-5\">
  79.             <div class=\"row\">
  80.                 <div class=\"col-12\">
  81.                     ";
  82.         // line 20
  83.         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)) {
  84.             // line 21
  85.             yield "                        <div class=\"animated fadeIn delay-0-8s\" style=\"width: 100%; height: 70vh;\" id=\"map\"></div>
  86.                     ";
  87.         } else {
  88.             // line 23
  89.             yield "                        <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
  90.                     ";
  91.         }
  92.         // line 25
  93.         yield "                </div>
  94.             </div>
  95.         </div>
  96.     </div>
  97. ";
  98.         
  99.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  100.         
  101.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  102.         yield from [];
  103.     }
  104.     // line 32
  105.     /**
  106.      * @return iterable<null|scalar|\Stringable>
  107.      */
  108.     public function block_javascripts(array $context, array $blocks = []): iterable
  109.     {
  110.         $macros $this->macros;
  111.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  112.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  113.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  114.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  115.         // line 33
  116.         yield "    ";
  117.         yield from $this->yieldParentBlock("javascripts"$context$blocks);
  118.         yield "
  119.     
  120.     <script>
  121.         \$(window).on('load', function() {
  122.             
  123.             var positions = ";
  124.         // line 40
  125.         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); })()));
  126.         yield ";
  127.             initMap();
  128.             function initMap() {
  129.                 //var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  130.                 var mapOptions = {
  131.                   zoom: 16,
  132.                   center: new google.maps.LatLng(positions[0][0],positions[0][1])
  133.                 }
  134.                 var map = new google.maps.Map(document.getElementById(\"map\"), mapOptions);
  135.                 var markers = [];
  136.                 positions.forEach(function(element) {
  137.                     markers.push(new google.maps.Marker({
  138.                         position: new google.maps.LatLng(element[0], element[1]),
  139.                         title: element[2] + \" - \" + element[0] + \" - \" + element[1]
  140.                     }));
  141.                 });
  142.                 // To add the marker to the map, call setMap();
  143.                 //markers[0].setMap(map);
  144.                 //marker2.setMap(map);
  145.                 markers.forEach(function(element) {
  146.                     element.setMap(map);
  147.                 });
  148.             }
  149.         });
  150.     </script>
  151. ";
  152.         
  153.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  154.         
  155.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  156.         yield from [];
  157.     }
  158.     /**
  159.      * @codeCoverageIgnore
  160.      */
  161.     public function getTemplateName(): string
  162.     {
  163.         return "debug/positions.html.twig";
  164.     }
  165.     /**
  166.      * @codeCoverageIgnore
  167.      */
  168.     public function isTraitable(): bool
  169.     {
  170.         return false;
  171.     }
  172.     /**
  173.      * @codeCoverageIgnore
  174.      */
  175.     public function getDebugInfo(): array
  176.     {
  177.         return array (  148 => 40,  137 => 33,  124 => 32,  108 => 25,  104 => 23,  100 => 21,  98 => 20,  85 => 10,  77 => 4,  64 => 3,  41 => 1,);
  178.     }
  179.     public function getSourceContext(): Source
  180.     {
  181.         return new Source("{% extends 'base.html.twig' %}
  182. {% block body %}
  183.     <div class=\"page\">
  184.         <div class=\"container\">
  185.             <div class=\"row animated fadeIn delay-0-2s\">
  186.                 <div class=\"col-12 mb-3 mb-lg-5\">
  187.                     <div class=\"\">
  188.                         <h2>All positions on {{ \"now\"|date(\"Y-m-d\") }}</h2>
  189.                     </div>
  190.                     <hr></hr>
  191.                 </div>
  192.             </div>
  193.         </div>
  194.         <div class=\"container pb-5\">
  195.             <div class=\"row\">
  196.                 <div class=\"col-12\">
  197.                     {% if positionGpsListArray %}
  198.                         <div class=\"animated fadeIn delay-0-8s\" style=\"width: 100%; height: 70vh;\" id=\"map\"></div>
  199.                     {% else %}
  200.                         <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
  201.                     {% endif %}
  202.                 </div>
  203.             </div>
  204.         </div>
  205.     </div>
  206. {% endblock %}
  207. {% block javascripts %}
  208.     {{ parent() }}
  209.     
  210.     <script>
  211.         \$(window).on('load', function() {
  212.             
  213.             var positions = {{ positionGpsListArray|json_encode()|raw }};
  214.             initMap();
  215.             function initMap() {
  216.                 //var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  217.                 var mapOptions = {
  218.                   zoom: 16,
  219.                   center: new google.maps.LatLng(positions[0][0],positions[0][1])
  220.                 }
  221.                 var map = new google.maps.Map(document.getElementById(\"map\"), mapOptions);
  222.                 var markers = [];
  223.                 positions.forEach(function(element) {
  224.                     markers.push(new google.maps.Marker({
  225.                         position: new google.maps.LatLng(element[0], element[1]),
  226.                         title: element[2] + \" - \" + element[0] + \" - \" + element[1]
  227.                     }));
  228.                 });
  229.                 // To add the marker to the map, call setMap();
  230.                 //markers[0].setMap(map);
  231.                 //marker2.setMap(map);
  232.                 markers.forEach(function(element) {
  233.                     element.setMap(map);
  234.                 });
  235.             }
  236.         });
  237.     </script>
  238. {% endblock %}""debug/positions.html.twig""/var/www/vhosts/webpro-developpement.fr/follow.webpro-developpement.fr/public/templates/debug/positions.html.twig");
  239.     }
  240. }