var/cache/dev/twig/53/5398f504f7b3af79cf91f120f639e2da.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/hobit.html.twig */
  16. class __TwigTemplate_1332b2402c6102e7401d31b1422b73aa 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/hobit.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/hobit.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 "    <div class=\"page\">
  64.         <div class=\"container\">
  65.             <div class=\"row animated fadeIn delay-0-2s\">
  66.                 <div class=\"col-12 mb-3 mb-lg-5\">
  67.                     <div class=\"\">
  68.                         <h2>Magic hobit</h2>
  69.                     </div>
  70.                     <div class=\"\">
  71.                         ";
  72.         // line 13
  73.         if ((($tmp = (isset($context["debugAndFlush"]) || array_key_exists("debugAndFlush"$context) ? $context["debugAndFlush"] : (function () { throw new RuntimeError('Variable "debugAndFlush" does not exist.'13$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  74.             // line 14
  75.             yield "                            <p>Debug and flush : Yes</p>
  76.                         ";
  77.         } else {
  78.             // line 16
  79.             yield "                            <p>Debug and flush : No</p>
  80.                         ";
  81.         }
  82.         // line 18
  83.         yield "                    </div>
  84.                     <hr></hr>
  85.                 </div>
  86.             </div>
  87.         </div>
  88.         ";
  89.         // line 25
  90.         if ((($tmp = (isset($context["tabHobit"]) || array_key_exists("tabHobit"$context) ? $context["tabHobit"] : (function () { throw new RuntimeError('Variable "tabHobit" does not exist.'25$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  91.             // line 26
  92.             yield "            ";
  93.             if ((($tmp = (isset($context["debugAndFlush"]) || array_key_exists("debugAndFlush"$context) ? $context["debugAndFlush"] : (function () { throw new RuntimeError('Variable "debugAndFlush" does not exist.'26$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  94.                 // line 27
  95.                 yield "                <div class=\"container\">
  96.                     <div class=\"row\">
  97.                         ";
  98.                 // line 29
  99.                 $context["i"] = 3;
  100.                 // line 30
  101.                 yield "                        ";
  102.                 $context["number"] = 1;
  103.                 // line 31
  104.                 yield "
  105.                         ";
  106.                 // line 32
  107.                 $context['_parent'] = $context;
  108.                 $context['_seq'] = CoreExtension::ensureTraversable((isset($context["tabHobit"]) || array_key_exists("tabHobit"$context) ? $context["tabHobit"] : (function () { throw new RuntimeError('Variable "tabHobit" does not exist.'32$this->source); })()));
  109.                 foreach ($context['_seq'] as $context["_key"] => $context["hobit"]) {
  110.                     // line 33
  111.                     yield "                            <div class=\"col-12 col-lg-4 mb-3 mb-lg-5\">
  112.                                 <div class=\"card animated fadeIn delay-0-";
  113.                     // line 34
  114.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["i"]) || array_key_exists("i"$context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.'34$this->source); })()), "html"nulltrue);
  115.                     yield "s\" style=\"width: 100%;\">
  116.                                     <div class=\"card-img-top animated fadeIn delay-0-8s\" style='text-align:center;'><iframe
  117.                                             width='100%'
  118.                                             height='300'
  119.                                             frameborder='0' style='border:0'
  120.                                             src='https://www.google.com/maps/embed/v1/place?key=AIzaSyAmbx9RsGi01srCnH_-2TVdH26TpjwvFDs
  121.                                 &q=";
  122.                     // line 40
  123.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"falsefalsefalse40), "latitude", [], "any"falsefalsefalse40), "html"nulltrue);
  124.                     yield ",";
  125.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"falsefalsefalse40), "longitude", [], "any"falsefalsefalse40), "html"nulltrue);
  126.                     yield "' 
  127.                                             allowfullscreen>
  128.                                           </iframe>
  129.                                     </div>
  130.                                     <div class=\"card-body\">
  131.                                         <h5 class=\"card-title\">Hobit ";
  132.                     // line 45
  133.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number"$context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.'45$this->source); })()), "html"nulltrue);
  134.                     yield "</h5>
  135.                                         <p class=\"card-text\">Date start : ";
  136.                     // line 46
  137.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["hobit"], "startDateTime", [], "array"falsefalsefalse46), "d/m/Y H:i"), "html"nulltrue);
  138.                     yield "</p>
  139.                                         <p class=\"card-text\">Date end : ";
  140.                     // line 47
  141.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["hobit"], "endDateTime", [], "array"falsefalsefalse47), "d/m/Y H:i"), "html"nulltrue);
  142.                     yield "</p>
  143.                                         <p class=\"card-text\">Latitude : ";
  144.                     // line 48
  145.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"falsefalsefalse48), "latitude", [], "any"falsefalsefalse48), "html"nulltrue);
  146.                     yield "</p>
  147.                                         <p class=\"card-text\">Longitude : ";
  148.                     // line 49
  149.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"falsefalsefalse49), "longitude", [], "any"falsefalsefalse49), "html"nulltrue);
  150.                     yield "</p>
  151.                                         <p class=\"card-text\">Number : ";
  152.                     // line 50
  153.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["hobit"], "number", [], "array"falsefalsefalse50), "html"nulltrue);
  154.                     yield "</p>
  155.                                     </div>
  156.                                 </div>
  157.                             </div>
  158.                             ";
  159.                     // line 54
  160.                     $context["i"] = ((isset($context["i"]) || array_key_exists("i"$context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.'54$this->source); })()) + 1);
  161.                     // line 55
  162.                     yield "                            ";
  163.                     $context["number"] = ((isset($context["number"]) || array_key_exists("number"$context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.'55$this->source); })()) + 1);
  164.                     // line 56
  165.                     yield "                        ";
  166.                 }
  167.                 $_parent $context['_parent'];
  168.                 unset($context['_seq'], $context['_key'], $context['hobit'], $context['_parent']);
  169.                 $context array_intersect_key($context$_parent) + $_parent;
  170.                 yield 
  171.                     </div>
  172.                 </div>
  173.             ";
  174.             } else {
  175.                 // line 60
  176.                 yield "                <div class=\"container\">
  177.                     <div class=\"row\">
  178.                         ";
  179.                 // line 62
  180.                 $context["number"] = 1;
  181.                 // line 63
  182.                 yield "                        ";
  183.                 $context['_parent'] = $context;
  184.                 $context['_seq'] = CoreExtension::ensureTraversable((isset($context["tabHobit"]) || array_key_exists("tabHobit"$context) ? $context["tabHobit"] : (function () { throw new RuntimeError('Variable "tabHobit" does not exist.'63$this->source); })()));
  185.                 foreach ($context['_seq'] as $context["_key"] => $context["hobit"]) {
  186.                     // line 64
  187.                     yield "                            <div class=\"col-12 col-lg-6\">
  188.                                 <div class=\"accordion\" id=\"accordionExample\">
  189.                                     <div class=\"accordion-item\">
  190.                                         <div class=\"title\">
  191.                                             ";
  192.                     // line 70
  193.                     if ((CoreExtension::getAttribute($this->env$this->source$context["hobit"], "activityType", [], "array"falsefalsefalse70) == "still")) {
  194.                         // line 71
  195.                         yield "                                                <i class=\"fas fa-chair\"></i>
  196.                                             ";
  197.                     } elseif ((CoreExtension::getAttribute($this->env$this->source,                     // line 72
  198. $context["hobit"], "activityType", [], "array"falsefalsefalse72) == "on_foot")) {
  199.                         // line 73
  200.                         yield "                                                <i class=\"fas fa-walking\"></i>
  201.                                             ";
  202.                     } elseif ((CoreExtension::getAttribute($this->env$this->source,                     // line 74
  203. $context["hobit"], "activityType", [], "array"falsefalsefalse74) == "on_bicycle")) {
  204.                         // line 75
  205.                         yield "                                                <i class=\"fas fa-bicycle\"></i>
  206.                                             ";
  207.                     } elseif ((CoreExtension::getAttribute($this->env$this->source,                     // line 76
  208. $context["hobit"], "activityType", [], "array"falsefalsefalse76) == "in_vehicle")) {
  209.                         // line 77
  210.                         yield "                                                <i class=\"fas fa-car\"></i>
  211.                                             ";
  212.                     }
  213.                     // line 79
  214.                     yield "
  215.                                             ";
  216.                     // line 80
  217.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["hobit"], "activityType", [], "array"falsefalsefalse80), "html"nulltrue);
  218.                     yield "
  219.                                         </div>
  220.                                         ";
  221.                     // line 83
  222.                     if (((CoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"truetruefalse83) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"falsefalsefalse83), "latitude", [], "any"falsefalsefalse83)) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"falsefalsefalse83), "longitude", [], "any"falsefalsefalse83))) {
  223.                         // line 84
  224.                         yield "                                            <div>
  225.                                                 <iframe
  226.                                                     width='100%'
  227.                                                     height='300'
  228.                                                     frameborder='0' style='border:0'
  229.                                                     src='https://www.google.com/maps/embed/v1/place?key=AIzaSyAmbx9RsGi01srCnH_-2TVdH26TpjwvFDs
  230.                                                         &q=";
  231.                         // line 90
  232.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"falsefalsefalse90), "latitude", [], "any"falsefalsefalse90), "html"nulltrue);
  233.                         yield ",";
  234.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["hobit"], "data", [], "array"falsefalsefalse90), "longitude", [], "any"falsefalsefalse90), "html"nulltrue);
  235.                         yield "' 
  236.                                                     allowfullscreen>
  237.                                                 </iframe>
  238.                                             </div>
  239.                                         ";
  240.                     } else {
  241.                         // line 95
  242.                         yield "                                            <div data-positions='";
  243.                         yield json_encode(CoreExtension::getAttribute($this->env$this->source$context["hobit"], "positions", [], "array"falsefalsefalse95));
  244.                         yield "' id=\"map-multi-";
  245.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number"$context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.'95$this->source); })()), "html"nulltrue);
  246.                         yield "\" class=\"animated fadeIn delay-0-8s map-multi\" style=\"width: 100%; height: 300px;\"></div>
  247.                                         ";
  248.                     }
  249.                     // line 97
  250.                     yield "
  251.                                         <div>
  252.                                             <button class=\"accordion-button button black mt-3 mb-3\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#tab-";
  253.                     // line 99
  254.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number"$context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.'99$this->source); })()), "html"nulltrue);
  255.                     yield "-main\" aria-expanded=\"true\" aria-controls=\"collapseOne\">Open</button>
  256.                                         </div>
  257.                                         <div id=\"tab-";
  258.                     // line 102
  259.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number"$context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.'102$this->source); })()), "html"nulltrue);
  260.                     yield "-main\" class=\"accordion-collapse collapse\" aria-labelledby=\"tab-";
  261.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number"$context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.'102$this->source); })()), "html"nulltrue);
  262.                     yield "-main-label\" data-bs-parent=\"#accordionExample\">
  263.                                           <div class=\"accordion-body\">
  264.                                             <div class=\"line\"><strong>Start date time : </strong><code>";
  265.                     // line 104
  266.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["hobit"], "startDateTime", [], "array"falsefalsefalse104), "d/m/Y H:i""Europe/Paris"), "html"nulltrue);
  267.                     yield "</code></div>
  268.                                             <div class=\"line\"><strong>Start date time server : </strong><code>";
  269.                     // line 105
  270.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["hobit"], "startDateTimeServer", [], "array"falsefalsefalse105), "d/m/Y H:i""Europe/Paris"), "html"nulltrue);
  271.                     yield "</code></div>
  272.                                             <div class=\"line\"><strong>End date time hobbit : </strong><code>";
  273.                     // line 106
  274.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["hobit"], "endDateTime", [], "array"falsefalsefalse106), "d/m/Y H:i""Europe/Paris"), "html"nulltrue);
  275.                     yield "</code></div> 
  276.                                 
  277.                                             <div class=\"line\"><strong>Type activity : </strong><code>";
  278.                     // line 108
  279.                     yield $this->extensions['Symfony\Bridge\Twig\Extension\DumpExtension']->dump($this->env$contextCoreExtension::getAttribute($this->env$this->source$context["hobit"], "activityType", [], "array"falsefalsefalse108));
  280.                     yield "</code></div>
  281.                                             ";
  282.                     // line 109
  283.                     if (CoreExtension::getAttribute($this->env$this->source$context["hobit"], "id", [], "array"truetruefalse109)) {
  284.                         // line 110
  285.                         yield "                                                <div class=\"line\"><strong>Id : </strong><code>";
  286.                         yield $this->extensions['Symfony\Bridge\Twig\Extension\DumpExtension']->dump($this->env$contextCoreExtension::getAttribute($this->env$this->source$context["hobit"], "id", [], "array"falsefalsefalse110));
  287.                         yield "</code></div>
  288.                                             ";
  289.                     }
  290.                     // line 112
  291.                     yield "
  292.                                             <div class=\"line\"><strong>Data : </strong><code>";
  293.                     // line 113
  294.                     yield $this->extensions['Symfony\Bridge\Twig\Extension\DumpExtension']->dump($this->env$context$context["hobit"]);
  295.                     yield "</code></div>
  296.                                           </div>
  297.                                         </div>
  298.                                     </div>
  299.                                     ";
  300.                     // line 117
  301.                     $context["number"] = ((isset($context["number"]) || array_key_exists("number"$context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.'117$this->source); })()) + 1);
  302.                     // line 118
  303.                     yield "                            
  304.                                 </div>
  305.                             </div>
  306.                         ";
  307.                 }
  308.                 $_parent $context['_parent'];
  309.                 unset($context['_seq'], $context['_key'], $context['hobit'], $context['_parent']);
  310.                 $context array_intersect_key($context$_parent) + $_parent;
  311.                 // line 122
  312.                 yield "                    </div>
  313.                 </div>
  314.             ";
  315.             }
  316.             // line 126
  317.             yield "
  318.         ";
  319.         } else {
  320.             // line 128
  321.             yield "            <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
  322.         ";
  323.         }
  324.         // line 130
  325.         yield "    </div>
  326. ";
  327.         
  328.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  329.         
  330.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  331.         yield from [];
  332.     }
  333.     // line 134
  334.     /**
  335.      * @return iterable<null|scalar|\Stringable>
  336.      */
  337.     public function block_javascripts(array $context, array $blocks = []): iterable
  338.     {
  339.         $macros $this->macros;
  340.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  341.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  342.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  343.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  344.         // line 135
  345.         yield "    ";
  346.         yield from $this->yieldParentBlock("javascripts"$context$blocks);
  347.         yield "
  348.     <script>
  349.         \$(window).on('load', function() {
  350.         
  351.             \$(\".map-multi\").each(function( index ) {
  352.                 console.log(JSON.parse(\$(this).attr(\"data-positions\")));
  353.                 initMap(\$(this).attr(\"id\"));
  354.             });
  355.             function initMap(idMap) {
  356.                 var positions = JSON.parse(\$(\"#\" + idMap).attr(\"data-positions\"));
  357.                 //var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  358.                 var mapOptions = {
  359.                   zoom: 16,
  360.                   center: new google.maps.LatLng(positions[0]['dataGps']['latitude'],positions[0]['dataGps']['longitude'])
  361.                 }
  362.                 var map = new google.maps.Map(document.getElementById(idMap), mapOptions);
  363.                 var markers = [];
  364.                 positions.forEach(function(element) {
  365.                     markers.push(new google.maps.Marker({
  366.                         position: new google.maps.LatLng(element['dataGps']['latitude'], element['dataGps']['longitude']),
  367.                         //title: element[2] + \" - \" + element[0] + \" - \" + element[1]
  368.                     }));
  369.                 });
  370.                 // To add the marker to the map, call setMap();
  371.                 //markers[0].setMap(map);
  372.                 //marker2.setMap(map);
  373.                 markers.forEach(function(element) {
  374.                     element.setMap(map);
  375.                 });
  376.             }
  377.         });
  378.     </script>
  379. ";
  380.         
  381.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  382.         
  383.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  384.         yield from [];
  385.     }
  386.     /**
  387.      * @codeCoverageIgnore
  388.      */
  389.     public function getTemplateName(): string
  390.     {
  391.         return "debug/hobit.html.twig";
  392.     }
  393.     /**
  394.      * @codeCoverageIgnore
  395.      */
  396.     public function isTraitable(): bool
  397.     {
  398.         return false;
  399.     }
  400.     /**
  401.      * @codeCoverageIgnore
  402.      */
  403.     public function getDebugInfo(): array
  404.     {
  405.         return array (  373 => 135,  360 => 134,  347 => 130,  343 => 128,  339 => 126,  333 => 122,  324 => 118,  322 => 117,  315 => 113,  312 => 112,  306 => 110,  304 => 109,  300 => 108,  295 => 106,  291 => 105,  287 => 104,  280 => 102,  274 => 99,  270 => 97,  262 => 95,  252 => 90,  244 => 84,  242 => 83,  236 => 80,  233 => 79,  229 => 77,  227 => 76,  224 => 75,  222 => 74,  219 => 73,  217 => 72,  214 => 71,  212 => 70,  204 => 64,  199 => 63,  197 => 62,  193 => 60,  182 => 56,  179 => 55,  177 => 54,  170 => 50,  166 => 49,  162 => 48,  158 => 47,  154 => 46,  150 => 45,  140 => 40,  131 => 34,  128 => 33,  124 => 32,  121 => 31,  118 => 30,  116 => 29,  112 => 27,  109 => 26,  107 => 25,  98 => 18,  94 => 16,  90 => 14,  88 => 13,  77 => 4,  64 => 3,  41 => 1,);
  406.     }
  407.     public function getSourceContext(): Source
  408.     {
  409.         return new Source("{% extends 'base.html.twig' %}
  410. {% block body %}
  411.     <div class=\"page\">
  412.         <div class=\"container\">
  413.             <div class=\"row animated fadeIn delay-0-2s\">
  414.                 <div class=\"col-12 mb-3 mb-lg-5\">
  415.                     <div class=\"\">
  416.                         <h2>Magic hobit</h2>
  417.                     </div>
  418.                     <div class=\"\">
  419.                         {% if debugAndFlush %}
  420.                             <p>Debug and flush : Yes</p>
  421.                         {% else %}
  422.                             <p>Debug and flush : No</p>
  423.                         {% endif %}
  424.                     </div>
  425.                     <hr></hr>
  426.                 </div>
  427.             </div>
  428.         </div>
  429.         {% if tabHobit %}
  430.             {% if debugAndFlush %}
  431.                 <div class=\"container\">
  432.                     <div class=\"row\">
  433.                         {% set i = 3 %}
  434.                         {% set number = 1 %}
  435.                         {% for hobit in tabHobit %}
  436.                             <div class=\"col-12 col-lg-4 mb-3 mb-lg-5\">
  437.                                 <div class=\"card animated fadeIn delay-0-{{ i }}s\" style=\"width: 100%;\">
  438.                                     <div class=\"card-img-top animated fadeIn delay-0-8s\" style='text-align:center;'><iframe
  439.                                             width='100%'
  440.                                             height='300'
  441.                                             frameborder='0' style='border:0'
  442.                                             src='https://www.google.com/maps/embed/v1/place?key=AIzaSyAmbx9RsGi01srCnH_-2TVdH26TpjwvFDs
  443.                                 &q={{ hobit['data'].latitude }},{{ hobit['data'].longitude }}' 
  444.                                             allowfullscreen>
  445.                                           </iframe>
  446.                                     </div>
  447.                                     <div class=\"card-body\">
  448.                                         <h5 class=\"card-title\">Hobit {{ number }}</h5>
  449.                                         <p class=\"card-text\">Date start : {{ hobit['startDateTime']|date(\"d/m/Y H:i\") }}</p>
  450.                                         <p class=\"card-text\">Date end : {{ hobit['endDateTime']|date(\"d/m/Y H:i\") }}</p>
  451.                                         <p class=\"card-text\">Latitude : {{ hobit['data'].latitude }}</p>
  452.                                         <p class=\"card-text\">Longitude : {{ hobit['data'].longitude }}</p>
  453.                                         <p class=\"card-text\">Number : {{ hobit['number'] }}</p>
  454.                                     </div>
  455.                                 </div>
  456.                             </div>
  457.                             {% set i = i + 1 %}
  458.                             {% set number = number + 1 %}
  459.                         {% endfor %} 
  460.                     </div>
  461.                 </div>
  462.             {% else %}
  463.                 <div class=\"container\">
  464.                     <div class=\"row\">
  465.                         {% set number = 1 %}
  466.                         {% for hobit in tabHobit %}
  467.                             <div class=\"col-12 col-lg-6\">
  468.                                 <div class=\"accordion\" id=\"accordionExample\">
  469.                                     <div class=\"accordion-item\">
  470.                                         <div class=\"title\">
  471.                                             {% if hobit['activityType'] == \"still\" %}
  472.                                                 <i class=\"fas fa-chair\"></i>
  473.                                             {% elseif hobit['activityType'] == \"on_foot\" %}
  474.                                                 <i class=\"fas fa-walking\"></i>
  475.                                             {% elseif hobit['activityType'] == \"on_bicycle\" %}
  476.                                                 <i class=\"fas fa-bicycle\"></i>
  477.                                             {% elseif hobit['activityType'] == \"in_vehicle\" %}
  478.                                                 <i class=\"fas fa-car\"></i>
  479.                                             {% endif %}
  480.                                             {{ hobit['activityType'] }}
  481.                                         </div>
  482.                                         {% if hobit[\"data\"] is defined and hobit[\"data\"].latitude and hobit[\"data\"].longitude %}
  483.                                             <div>
  484.                                                 <iframe
  485.                                                     width='100%'
  486.                                                     height='300'
  487.                                                     frameborder='0' style='border:0'
  488.                                                     src='https://www.google.com/maps/embed/v1/place?key=AIzaSyAmbx9RsGi01srCnH_-2TVdH26TpjwvFDs
  489.                                                         &q={{ hobit[\"data\"].latitude }},{{ hobit[\"data\"].longitude }}' 
  490.                                                     allowfullscreen>
  491.                                                 </iframe>
  492.                                             </div>
  493.                                         {% else %}
  494.                                             <div data-positions='{{ hobit['positions']|json_encode()|raw }}' id=\"map-multi-{{ number }}\" class=\"animated fadeIn delay-0-8s map-multi\" style=\"width: 100%; height: 300px;\"></div>
  495.                                         {% endif %}
  496.                                         <div>
  497.                                             <button class=\"accordion-button button black mt-3 mb-3\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#tab-{{ number }}-main\" aria-expanded=\"true\" aria-controls=\"collapseOne\">Open</button>
  498.                                         </div>
  499.                                         <div id=\"tab-{{ number }}-main\" class=\"accordion-collapse collapse\" aria-labelledby=\"tab-{{ number }}-main-label\" data-bs-parent=\"#accordionExample\">
  500.                                           <div class=\"accordion-body\">
  501.                                             <div class=\"line\"><strong>Start date time : </strong><code>{{ hobit['startDateTime']|date(\"d/m/Y H:i\", \"Europe/Paris\") }}</code></div>
  502.                                             <div class=\"line\"><strong>Start date time server : </strong><code>{{ hobit['startDateTimeServer']|date(\"d/m/Y H:i\", \"Europe/Paris\") }}</code></div>
  503.                                             <div class=\"line\"><strong>End date time hobbit : </strong><code>{{ hobit['endDateTime']|date(\"d/m/Y H:i\", \"Europe/Paris\") }}</code></div> 
  504.                                 
  505.                                             <div class=\"line\"><strong>Type activity : </strong><code>{{ dump(hobit['activityType']) }}</code></div>
  506.                                             {% if hobit['id'] is defined %}
  507.                                                 <div class=\"line\"><strong>Id : </strong><code>{{ dump(hobit['id']) }}</code></div>
  508.                                             {% endif %}
  509.                                             <div class=\"line\"><strong>Data : </strong><code>{{ dump(hobit) }}</code></div>
  510.                                           </div>
  511.                                         </div>
  512.                                     </div>
  513.                                     {% set number = number + 1 %}
  514.                             
  515.                                 </div>
  516.                             </div>
  517.                         {% endfor %}
  518.                     </div>
  519.                 </div>
  520.             {% endif %}
  521.         {% else %}
  522.             <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
  523.         {% endif %}
  524.     </div>
  525. {% endblock %}
  526. {% block javascripts %}
  527.     {{ parent() }}
  528.     <script>
  529.         \$(window).on('load', function() {
  530.         
  531.             \$(\".map-multi\").each(function( index ) {
  532.                 console.log(JSON.parse(\$(this).attr(\"data-positions\")));
  533.                 initMap(\$(this).attr(\"id\"));
  534.             });
  535.             function initMap(idMap) {
  536.                 var positions = JSON.parse(\$(\"#\" + idMap).attr(\"data-positions\"));
  537.                 //var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  538.                 var mapOptions = {
  539.                   zoom: 16,
  540.                   center: new google.maps.LatLng(positions[0]['dataGps']['latitude'],positions[0]['dataGps']['longitude'])
  541.                 }
  542.                 var map = new google.maps.Map(document.getElementById(idMap), mapOptions);
  543.                 var markers = [];
  544.                 positions.forEach(function(element) {
  545.                     markers.push(new google.maps.Marker({
  546.                         position: new google.maps.LatLng(element['dataGps']['latitude'], element['dataGps']['longitude']),
  547.                         //title: element[2] + \" - \" + element[0] + \" - \" + element[1]
  548.                     }));
  549.                 });
  550.                 // To add the marker to the map, call setMap();
  551.                 //markers[0].setMap(map);
  552.                 //marker2.setMap(map);
  553.                 markers.forEach(function(element) {
  554.                     element.setMap(map);
  555.                 });
  556.             }
  557.         });
  558.     </script>
  559. {% endblock %}""debug/hobit.html.twig""/var/www/vhosts/webpro-developpement.fr/follow.webpro-developpement.fr/public/templates/debug/hobit.html.twig");
  560.     }
  561. }