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