var/cache/review/twig/fe/fe6ae84e185bac133a8df8c62c15d6de.php line 70

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Map/page.html.twig */
  14. class __TwigTemplate_a28a045d3be3f3299f645cdfe29370c8 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'metaDescription' => [$this'block_metaDescription'],
  25.             'stylesheet' => [$this'block_stylesheet'],
  26.             'name_page' => [$this'block_name_page'],
  27.             'bodyClasses' => [$this'block_bodyClasses'],
  28.             'mainContainer' => [$this'block_mainContainer'],
  29.             'javascripts' => [$this'block_javascripts'],
  30.         ];
  31.     }
  32.     protected function doGetParent(array $context)
  33.     {
  34.         // line 1
  35.         return "grid.html.twig";
  36.     }
  37.     protected function doDisplay(array $context, array $blocks = [])
  38.     {
  39.         $macros $this->macros;
  40.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  41.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Map/page.html.twig"));
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Map/page.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Map/page.html.twig"));
  46.         $this->parent $this->loadTemplate("grid.html.twig""Map/page.html.twig"1);
  47.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  48.         
  49.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  50.         
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  52.         
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  54.     }
  55.     // line 3
  56.     public function block_title($context, array $blocks = [])
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  60.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  62.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  64.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  65.         // line 4
  66.         echo "    ";
  67.         echo twig_escape_filter($this->env$this->extensions['App\Twig\SeoExtension']->metaTitle(), "html"nulltrue);
  68.         echo "
  69. ";
  70.         
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  72.         
  73.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  74.         
  75.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  76.     }
  77.     // line 7
  78.     public function block_metaDescription($context, array $blocks = [])
  79.     {
  80.         $macros $this->macros;
  81.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  82.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metaDescription"));
  83.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  84.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metaDescription"));
  85.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  86.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metaDescription"));
  87.         // line 8
  88.         echo "    <meta name=\"description\" content=\"";
  89.         echo twig_escape_filter($this->env$this->extensions['App\Twig\SeoExtension']->metaDescription(), "html"nulltrue);
  90.         echo "\">
  91. ";
  92.         
  93.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  94.         
  95.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  96.         
  97.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  98.     }
  99.     // line 11
  100.     public function block_stylesheet($context, array $blocks = [])
  101.     {
  102.         $macros $this->macros;
  103.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  104.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  105.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  106.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  107.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  108.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  109.         // line 12
  110.         echo "    ";
  111.         $this->displayParentBlock("stylesheet"$context$blocks);
  112.         echo "
  113.     <link rel=\"stylesheet\" href=\"//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css\">
  114. ";
  115.         
  116.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  117.         
  118.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  119.         
  120.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  121.     }
  122.     // line 16
  123.     public function block_name_page($context, array $blocks = [])
  124.     {
  125.         $macros $this->macros;
  126.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  127.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""name_page"));
  128.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  129.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""name_page"));
  130.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  131.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""name_page"));
  132.         echo "map";
  133.         
  134.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  135.         
  136.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  137.         
  138.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  139.     }
  140.     // line 17
  141.     public function block_bodyClasses($context, array $blocks = [])
  142.     {
  143.         $macros $this->macros;
  144.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  145.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClasses"));
  146.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  147.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClasses"));
  148.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  149.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClasses"));
  150.         echo "map-page";
  151.         
  152.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  153.         
  154.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  155.         
  156.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  157.     }
  158.     // line 18
  159.     public function block_mainContainer($context, array $blocks = [])
  160.     {
  161.         $macros $this->macros;
  162.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  163.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  164.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  165.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  166.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  167.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  168.         // line 19
  169.         echo "    ";
  170.         if ((array_key_exists("city"$context) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'19$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse19), "latitude", [], "any"falsefalsefalse19))) {
  171.             // line 20
  172.             echo "        ";
  173.             $context["coordss"] = 1;
  174.             // line 21
  175.             echo "        ";
  176.             $context["lat"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'21$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse21), "latitude", [], "any"falsefalsefalse21);
  177.             // line 22
  178.             echo "        ";
  179.             $context["lon"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'22$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse22), "longitude", [], "any"falsefalsefalse22);
  180.             // line 23
  181.             echo "    ";
  182.         } else {
  183.             // line 24
  184.             echo "        ";
  185.             $context["coordss"] = 0;
  186.             // line 25
  187.             echo "        ";
  188.             $context["lat"] = "55.75";
  189.             // line 26
  190.             echo "        ";
  191.             $context["lon"] = "37.61";
  192.             // line 27
  193.             echo "    ";
  194.         }
  195.         // line 28
  196.         echo "
  197.     <h1 class=\"border-line\">";
  198.         // line 29
  199.         if (twig_test_empty($this->extensions['App\Twig\SeoExtension']->pageHeading())) {
  200.             echo "%Интим карта";
  201.         } else {
  202.             echo $this->extensions['App\Twig\SeoExtension']->pageHeading();
  203.         }
  204.         echo "</h1>
  205.     <p class=\"text-desc mb-lg-4\">
  206.         На карте обозначено местоположение зарегистрированных анкет.<br>
  207.         Кликнув на маркер Вы узнаете краткую информацию о девушке.
  208.     </p>
  209.     <div class=\"map\">
  210.         <div class=\"filter-line d-flex justify-content-center justify-content-md-between mb-2 mb-md-3 mb-lg-4\">
  211.             <button class=\"btn btn-secondary btn-collapse-filter\" type=\"button\" id=\"filter-expand\">
  212.                 <svg class=\"icon mr-1\">
  213.                     <use xlink:href=\"#icon-dropdown\"></use>
  214.                 </svg>
  215.                 Расширенный поиск
  216.             </button>
  217.             <div class=\"d-flex align-items-center collapse-reset ml-2\">
  218.                 <span class=\"d-none\" id=\"count-parameters\">Выбрано <em>0</em> параметров</span>
  219.                 <button class=\"btn btn-secondary btn-collapse-reset ml-md-2\" id=\"reset-form-2\" data-reset=\"true\">Сброс</button>
  220.             </div>
  221.         </div>
  222.         <div class=\"collapse\" id=\"collapseFilter\">
  223.         </div>
  224.         <div class=\"map-wrap loading\" id=\"map-wrap\" style=\"width: 100%; height: 700px;\">
  225.         </div>
  226.     </div>
  227.     ";
  228.         // line 54
  229.         echo "\t";
  230.         echo twig_include($this->env$context"components/seo.partial.twig", ["type" => "top"]);
  231.         echo "
  232. \t";
  233.         // line 55
  234.         echo twig_include($this->env$context"components/seo.partial.twig", ["type" => "bottom"]);
  235.         echo "
  236. ";
  237.         
  238.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  239.         
  240.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  241.         
  242.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  243.     }
  244.     // line 59
  245.     public function block_javascripts($context, array $blocks = [])
  246.     {
  247.         $macros $this->macros;
  248.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  249.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  250.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  251.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  252.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  253.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  254.         // line 60
  255.         echo "    ";
  256.         $this->displayParentBlock("javascripts"$context$blocks);
  257.         echo "
  258.     ";
  259.         // line 62
  260.         if ((array_key_exists("city"$context) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'62$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse62), "latitude", [], "any"falsefalsefalse62))) {
  261.             // line 63
  262.             echo "\t\t";
  263.             $context["lat"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'63$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse63), "latitude", [], "any"falsefalsefalse63);
  264.             // line 64
  265.             echo "\t\t";
  266.             $context["lon"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["city"]) || array_key_exists("city"$context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.'64$this->source); })()), "mapCoordinate", [], "any"falsefalsefalse64), "longitude", [], "any"falsefalsefalse64);
  267.             // line 65
  268.             echo "\t";
  269.         } else {
  270.             // line 66
  271.             echo "\t\t";
  272.             $context["lat"] = "55.753215";
  273.             // line 67
  274.             echo "\t\t";
  275.             $context["lon"] = "37.622504";
  276.             // line 68
  277.             echo "\t";
  278.         }
  279.         // line 69
  280.         echo "
  281. \t<script src=\"";
  282.         // line 70
  283.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/fosjsrouting/js/router.min.js"), "html"nulltrue);
  284.         echo "\" defer></script>
  285. \t<script src=\"";
  286.         // line 71
  287.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fos_js_routing_js", ["callback" => "fos.Router.setData"]);
  288.         echo "\" defer></script>
  289. \t<script src=\"https://api-maps.yandex.ru/2.1/?lang=ru_RU&onload=initMap&ns=ym\" defer></script>
  290. \t<script>
  291.         const mapConfig = {
  292. \t\t\tid:\"map-wrap\",
  293. \t\t\tmultiple_cities:\"";
  294.         // line 77
  295.         echo twig_escape_filter($this->env, (isset($context["multipleCities"]) || array_key_exists("multipleCities"$context) ? $context["multipleCities"] : (function () { throw new RuntimeError('Variable "multipleCities" does not exist.'77$this->source); })()), "html"nulltrue);
  296.         echo "\",
  297. \t\t\troutes_url: \"";
  298.         // line 78
  299.         echo ((((isset($context["multipleCities"]) || array_key_exists("multipleCities"$context) ? $context["multipleCities"] : (function () { throw new RuntimeError('Variable "multipleCities" does not exist.'78$this->source); })()) == 0)) ? ("/js/fos_js_routes.json") : ("/js/fos_js_routes_city_prefixed.json"));
  300.         echo "\",
  301. \t\t\tcity_uri_identity:\"";
  302.         // line 79
  303.         echo twig_escape_filter($this->env, (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'79$this->source); })()), "html"nulltrue);
  304.         echo "\",
  305. \t\t\tcity_latitude:\"";
  306.         // line 80
  307.         echo twig_escape_filter($this->env, (isset($context["lat"]) || array_key_exists("lat"$context) ? $context["lat"] : (function () { throw new RuntimeError('Variable "lat" does not exist.'80$this->source); })()), "html"nulltrue);
  308.         echo "\",
  309. \t\t\tcity_longitude:\"";
  310.         // line 81
  311.         echo twig_escape_filter($this->env, (isset($context["lon"]) || array_key_exists("lon"$context) ? $context["lon"] : (function () { throw new RuntimeError('Variable "lon" does not exist.'81$this->source); })()), "html"nulltrue);
  312.         echo "\",
  313. \t\t\tlocale:\"";
  314.         // line 82
  315.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'82$this->source); })()), "request", [], "any"falsefalsefalse82), "locale", [], "any"falsefalsefalse82), "html"nulltrue);
  316.         echo "\",
  317. \t\t\tpath:\"";
  318.         // line 83
  319.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.filter", ["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'83$this->source); })())]), "html"nulltrue);
  320.         echo "\",
  321. \t\t\ticon_profile:\"";
  322.         // line 85
  323.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/profile.svg"), "html"nulltrue);
  324.         echo "\",
  325. \t\t\ticon_profile_active:\"";
  326.         // line 86
  327.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/profile-active.svg"), "html"nulltrue);
  328.         echo "\",
  329. \t\t\ticon_profile_hover:\"";
  330.         // line 87
  331.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/profile-hover.svg"), "html"nulltrue);
  332.         echo "\",
  333. \t\t\ticon_saloon:\"";
  334.         // line 89
  335.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/saloon.svg"), "html"nulltrue);
  336.         echo "\",
  337. \t\t\ticon_saloon_active:\"";
  338.         // line 90
  339.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/saloon-active.svg"), "html"nulltrue);
  340.         echo "\",
  341. \t\t\ticon_saloon_hover:\"";
  342.         // line 91
  343.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/saloon-hover.svg"), "html"nulltrue);
  344.         echo "\",
  345. \t\t\ticon_masseur:\"";
  346.         // line 93
  347.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/masseur.svg"), "html"nulltrue);
  348.         echo "\",
  349. \t\t\ticon_masseur_active:\"";
  350.         // line 94
  351.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/masseur-active.svg"), "html"nulltrue);
  352.         echo "\",
  353. \t\t\ticon_masseur_hover:\"";
  354.         // line 95
  355.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/masseur-hover.svg"), "html"nulltrue);
  356.         echo "\",
  357. \t\t\ticon_cluster_small:\"";
  358.         // line 97
  359.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/cluster-small.svg"), "html"nulltrue);
  360.         echo "\",
  361. \t\t\ticon_cluster_medium:\"";
  362.         // line 98
  363.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/cluster-medium.svg"), "html"nulltrue);
  364.         echo "\",
  365. \t\t\ticon_cluster_big:\"";
  366.         // line 99
  367.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/map/cluster-big.svg"), "html"nulltrue);
  368.         echo "\",
  369. \t\t\tavatar_path : \"";
  370.         // line 101
  371.         echo twig_escape_filter($this->env$this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path""profile_media_avatar""200x280""jpg"), "html"nulltrue);
  372.         echo "\",
  373. \t\t\tphoto_path : \"";
  374.         // line 102
  375.         echo twig_escape_filter($this->env$this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path""profile_media""200x280""jpg"), "html"nulltrue);
  376.         echo "\",
  377. \t\t\tthumb_path : \"";
  378.         // line 103
  379.         echo twig_escape_filter($this->env$this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl("replace_path""saloon_media_thumb""200x280""jpg"), "html"nulltrue);
  380.         echo "\",
  381. \t\t\tprocess_profile_shows_url  : \"";
  382.         // line 104
  383.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.increment_profile_shows", (((isset($context["multipleCities"]) || array_key_exists("multipleCities"$context) ? $context["multipleCities"] : (function () { throw new RuntimeError('Variable "multipleCities" does not exist.'104$this->source); })())) ? (["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'104$this->source); })())]) : ([]))), "html"nulltrue);
  384.         echo "\"
  385. \t\t};
  386. \t\tvar isMapInitialized = false;
  387. \t\tvar yaMapLoaded = false;
  388. \t\tfunction initMap() {
  389. \t\t\t//console.log('initMap');
  390. \t\t\twindow.ymap = new ym.Map(document.getElementById('map-wrap'), {
  391. \t\t\t\tcenter: [\"";
  392.         // line 112
  393.         echo twig_escape_filter($this->env, (isset($context["lat"]) || array_key_exists("lat"$context) ? $context["lat"] : (function () { throw new RuntimeError('Variable "lat" does not exist.'112$this->source); })()), "html"nulltrue);
  394.         echo "\", \"";
  395.         echo twig_escape_filter($this->env, (isset($context["lon"]) || array_key_exists("lon"$context) ? $context["lon"] : (function () { throw new RuntimeError('Variable "lon" does not exist.'112$this->source); })()), "html"nulltrue);
  396.         echo "\"],
  397. \t\t\t\tzoom: 8,
  398. \t\t\t\tcontrols: ['zoomControl', 'typeSelector',  'fullscreenControl']
  399. \t\t\t});
  400. \t\t\tyaMapLoaded = true;
  401. \t\t\t//if (!isMapInitialized) {
  402. \t\t\t//\tconsole.log('new mapPage initMap');
  403. \t\t\t//\tisMapInitialized = true;
  404. \t\t\t//\tnew MapPage(mapConfig);
  405. \t\t\t//}
  406. \t\t}
  407. \t\twindow.profileShowed = function ({id}) {
  408. \t\t\tif (!id) return;
  409. \t\t\tfetch('";
  410.         // line 127
  411.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_ctr.increase_shows");
  412.         echo "', {
  413. \t\t\t\tmethod: \"POST\",
  414. \t\t\t\tbody: JSON.stringify({ profiles: [id], source: 'map' }),
  415. \t\t\t});
  416. \t\t}
  417.         window.stations = {";
  418.         // line 134
  419.         $context['_parent'] = $context;
  420.         $context['_seq'] = twig_ensure_traversable($this->extensions['App\Twig\StationsExtension']->stations());
  421.         $context['loop'] = [
  422.           'parent' => $context['_parent'],
  423.           'index0' => 0,
  424.           'index'  => 1,
  425.           'first'  => true,
  426.         ];
  427.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  428.             $length count($context['_seq']);
  429.             $context['loop']['revindex0'] = $length 1;
  430.             $context['loop']['revindex'] = $length;
  431.             $context['loop']['length'] = $length;
  432.             $context['loop']['last'] = === $length;
  433.         }
  434.         foreach ($context['_seq'] as $context["_key"] => $context["station"]) {
  435.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["station"], "id", [], "any"falsefalsefalse134), "html"nulltrue);
  436.             echo ":{icon:`";
  437.             $this->loadTemplate("components/metro/icon_generate.partial.twig""Map/page.html.twig"134)->display(twig_array_merge($context, ["data" => $this->extensions['App\Twig\StationsExtension']->stationLines($context["station"])]));
  438.             echo "`,name:`";
  439.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["station"], "name", [], "any"falsefalsefalse134), "html"nulltrue);
  440.             echo "`},";
  441.             ++$context['loop']['index0'];
  442.             ++$context['loop']['index'];
  443.             $context['loop']['first'] = false;
  444.             if (isset($context['loop']['length'])) {
  445.                 --$context['loop']['revindex0'];
  446.                 --$context['loop']['revindex'];
  447.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  448.             }
  449.         }
  450.         $_parent $context['_parent'];
  451.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['station'], $context['_parent'], $context['loop']);
  452.         $context array_intersect_key($context$_parent) + $_parent;
  453.         // line 135
  454.         echo "};
  455.         document.addEventListener('DOMContentLoaded', function () {
  456. \t\t\tfunction loadForm() {
  457. \t\t\t\tfetch('";
  458.         // line 139
  459.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.form", ["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'139$this->source); })())]), "html"nulltrue);
  460.         echo "', {
  461. \t\t\t\t\tmode: \"cors\",
  462. \t\t\t\t\timportance: \"low\",
  463. \t\t\t\t\tmethod: \"POST\",
  464. \t\t\t\t\theaders: {
  465. \t\t\t\t\t\t\"Content-Type\": \"application/x-www-form-urlencoded\",
  466. \t\t\t\t\t\t\"X-Requested-With\": \"XMLHttpRequest\"
  467. \t\t\t\t\t},
  468. \t\t\t\t}).then(response => {
  469. \t\t\t\t\tif (response.status < 300) {
  470. \t\t\t\t\t\treturn response.text();
  471. \t\t\t\t\t} else {
  472. \t\t\t\t\t\tconsole.warn(\"🤔\");
  473. \t\t\t\t\t\treturn null;
  474. \t\t\t\t\t}
  475. \t\t\t\t}).then(response => {
  476. \t\t\t\t\tdocument.getElementById('collapseFilter').innerHTML = response;
  477. \t\t\t\t\tfilterLoader()
  478. \t\t\t\t});
  479. \t\t\t}
  480. \t\t\tloadForm();
  481. \t\t\tfunction filterLoader() {
  482. \t\t\t\tconst stringifyData = `{\"city_id\":\"\${document.getElementById('filter_map_form_city_id').value}\",\"_token\":\"\${document.getElementById('filter_map_form__token').value}\"}`;
  483. \t\t\t\tfetch(\"";
  484.         // line 164
  485.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("map.filter", ["city" => (isset($context["cityUriIdentity"]) || array_key_exists("cityUriIdentity"$context) ? $context["cityUriIdentity"] : (function () { throw new RuntimeError('Variable "cityUriIdentity" does not exist.'164$this->source); })())]), "html"nulltrue);
  486.         echo "\", {
  487. \t\t\t\t\tmethod: \"POST\",
  488. \t\t\t\t\theaders: {
  489. \t\t\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  490. \t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest',
  491. \t\t\t\t\t},
  492. \t\t\t\t\tbody: new URLSearchParams({ form: stringifyData }).toString(),
  493. \t\t\t\t})
  494. \t\t\t\t\t.then(response => response.json())
  495. \t\t\t\t\t.then(data => {
  496. \t\t\t\t\t\t//console.log('map-data-loaded')
  497. \t\t\t\t\t\tconst mapLoadedInterval = setInterval(()=>{
  498. \t\t\t\t\t\t\tif (yaMapLoaded) {
  499. \t\t\t\t\t\t\t\tnew MapPage(mapConfig);
  500. \t\t\t\t\t\t\t\tdocument.dispatchEvent(new CustomEvent('map:data:loaded', { detail: { data, stringifyData } }));
  501. \t\t\t\t\t\t\t\tclearInterval(mapLoadedInterval)
  502. \t\t\t\t\t\t\t}
  503. \t\t\t\t\t\t}, 200)
  504. \t\t\t\t\t})
  505. \t\t\t\t\t.catch(error => console.error(error));
  506. \t\t\t\t//if (!isMapInitialized) {
  507. \t\t\t\t//\tconsole.log('new mapPage filterLoader');
  508. \t\t\t\t//\tisMapInitialized = true;
  509. \t\t\t\t//\tnew MapPage(mapConfig);
  510. \t\t\t\t//}
  511. \t\t\t}
  512. \t\t})
  513. \t</script>
  514. ";
  515.         
  516.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  517.         
  518.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  519.         
  520.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  521.     }
  522.     /**
  523.      * @codeCoverageIgnore
  524.      */
  525.     public function getTemplateName()
  526.     {
  527.         return "Map/page.html.twig";
  528.     }
  529.     /**
  530.      * @codeCoverageIgnore
  531.      */
  532.     public function isTraitable()
  533.     {
  534.         return false;
  535.     }
  536.     /**
  537.      * @codeCoverageIgnore
  538.      */
  539.     public function getDebugInfo()
  540.     {
  541.         return array (  559 => 164,  531 => 139,  525 => 135,  490 => 134,  481 => 127,  461 => 112,  450 => 104,  446 => 103,  442 => 102,  438 => 101,  433 => 99,  429 => 98,  425 => 97,  420 => 95,  416 => 94,  412 => 93,  407 => 91,  403 => 90,  399 => 89,  394 => 87,  390 => 86,  386 => 85,  381 => 83,  377 => 82,  373 => 81,  369 => 80,  365 => 79,  361 => 78,  357 => 77,  348 => 71,  344 => 70,  341 => 69,  338 => 68,  335 => 67,  332 => 66,  329 => 65,  326 => 64,  323 => 63,  321 => 62,  315 => 60,  302 => 59,  287 => 55,  282 => 54,  251 => 29,  248 => 28,  245 => 27,  242 => 26,  239 => 25,  236 => 24,  233 => 23,  230 => 22,  227 => 21,  224 => 20,  221 => 19,  208 => 18,  183 => 17,  158 => 16,  141 => 12,  128 => 11,  112 => 8,  99 => 7,  83 => 4,  70 => 3,  41 => 1,);
  542.     }
  543.     public function getSourceContext()
  544.     {
  545.         return new Source("{% extends 'grid.html.twig' %}
  546. {% block title %}
  547.     {{ seo_title() }}
  548. {% endblock %}
  549. {% block metaDescription %}
  550.     <meta name=\"description\" content=\"{{ seo_description() }}\">
  551. {% endblock %}
  552. {% block stylesheet %}
  553.     {{ parent() }}
  554.     <link rel=\"stylesheet\" href=\"//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css\">
  555. {% endblock %}
  556. {% block name_page %}map{% endblock %}
  557. {% block bodyClasses %}map-page{% endblock %}
  558. {% block mainContainer %}
  559.     {% if city is defined and city.mapCoordinate.latitude %}
  560.         {% set coordss = 1 %}
  561.         {% set lat = city.mapCoordinate.latitude %}
  562.         {% set lon = city.mapCoordinate.longitude %}
  563.     {% else %}
  564.         {% set coordss = 0 %}
  565.         {% set lat = '55.75' %}
  566.         {% set lon = '37.61' %}
  567.     {% endif %}
  568.     <h1 class=\"border-line\">{% if seo_heading() is empty %}%Интим карта{% else %}{{ seo_heading() }}{% endif %}</h1>
  569.     <p class=\"text-desc mb-lg-4\">
  570.         На карте обозначено местоположение зарегистрированных анкет.<br>
  571.         Кликнув на маркер Вы узнаете краткую информацию о девушке.
  572.     </p>
  573.     <div class=\"map\">
  574.         <div class=\"filter-line d-flex justify-content-center justify-content-md-between mb-2 mb-md-3 mb-lg-4\">
  575.             <button class=\"btn btn-secondary btn-collapse-filter\" type=\"button\" id=\"filter-expand\">
  576.                 <svg class=\"icon mr-1\">
  577.                     <use xlink:href=\"#icon-dropdown\"></use>
  578.                 </svg>
  579.                 Расширенный поиск
  580.             </button>
  581.             <div class=\"d-flex align-items-center collapse-reset ml-2\">
  582.                 <span class=\"d-none\" id=\"count-parameters\">Выбрано <em>0</em> параметров</span>
  583.                 <button class=\"btn btn-secondary btn-collapse-reset ml-md-2\" id=\"reset-form-2\" data-reset=\"true\">Сброс</button>
  584.             </div>
  585.         </div>
  586.         <div class=\"collapse\" id=\"collapseFilter\">
  587.         </div>
  588.         <div class=\"map-wrap loading\" id=\"map-wrap\" style=\"width: 100%; height: 700px;\">
  589.         </div>
  590.     </div>
  591.     {# {{ include('components/big_footer.html.twig', { 'type': 'main' }) }} #}
  592. \t{{ include('components/seo.partial.twig', {type: 'top'}) }}
  593. \t{{ include('components/seo.partial.twig', {type: 'bottom'}) }}
  594. {% endblock %}
  595. {% block javascripts %}
  596.     {{ parent() }}
  597.     {% if city is defined and city.mapCoordinate.latitude %}
  598. \t\t{% set lat = city.mapCoordinate.latitude %}
  599. \t\t{% set lon = city.mapCoordinate.longitude %}
  600. \t{% else %}
  601. \t\t{% set lat = '55.753215' %}
  602. \t\t{% set lon = '37.622504' %}
  603. \t{% endif %}
  604. \t<script src=\"{{ asset('bundles/fosjsrouting/js/router.min.js') }}\" defer></script>
  605. \t<script src=\"{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}\" defer></script>
  606. \t<script src=\"https://api-maps.yandex.ru/2.1/?lang=ru_RU&onload=initMap&ns=ym\" defer></script>
  607. \t<script>
  608.         const mapConfig = {
  609. \t\t\tid:\"map-wrap\",
  610. \t\t\tmultiple_cities:\"{{ multipleCities }}\",
  611. \t\t\troutes_url: \"{{ multipleCities == 0 ? '/js/fos_js_routes.json' : '/js/fos_js_routes_city_prefixed.json' }}\",
  612. \t\t\tcity_uri_identity:\"{{ cityUriIdentity }}\",
  613. \t\t\tcity_latitude:\"{{ lat }}\",
  614. \t\t\tcity_longitude:\"{{ lon }}\",
  615. \t\t\tlocale:\"{{ app.request.locale }}\",
  616. \t\t\tpath:\"{{ path('map.filter', {city:cityUriIdentity}) }}\",
  617. \t\t\ticon_profile:\"{{ asset('assets/images/map/profile.svg') }}\",
  618. \t\t\ticon_profile_active:\"{{ asset('assets/images/map/profile-active.svg') }}\",
  619. \t\t\ticon_profile_hover:\"{{ asset('assets/images/map/profile-hover.svg') }}\",
  620. \t\t\ticon_saloon:\"{{ asset('assets/images/map/saloon.svg') }}\",
  621. \t\t\ticon_saloon_active:\"{{ asset('assets/images/map/saloon-active.svg') }}\",
  622. \t\t\ticon_saloon_hover:\"{{ asset('assets/images/map/saloon-hover.svg') }}\",
  623. \t\t\ticon_masseur:\"{{ asset('assets/images/map/masseur.svg') }}\",
  624. \t\t\ticon_masseur_active:\"{{ asset('assets/images/map/masseur-active.svg') }}\",
  625. \t\t\ticon_masseur_hover:\"{{ asset('assets/images/map/masseur-hover.svg') }}\",
  626. \t\t\ticon_cluster_small:\"{{ asset('assets/images/map/cluster-small.svg') }}\",
  627. \t\t\ticon_cluster_medium:\"{{ asset('assets/images/map/cluster-medium.svg') }}\",
  628. \t\t\ticon_cluster_big:\"{{ asset('assets/images/map/cluster-big.svg') }}\",
  629. \t\t\tavatar_path : \"{{ responsive_asset('replace_path', 'profile_media_avatar', \"200x280\", \"jpg\") }}\",
  630. \t\t\tphoto_path : \"{{ responsive_asset('replace_path', 'profile_media', \"200x280\", \"jpg\") }}\",
  631. \t\t\tthumb_path : \"{{ responsive_asset('replace_path', 'saloon_media_thumb', \"200x280\", \"jpg\") }}\",
  632. \t\t\tprocess_profile_shows_url  : \"{{ path('map.increment_profile_shows', multipleCities ? {city:cityUriIdentity} : {}) }}\"
  633. \t\t};
  634. \t\tvar isMapInitialized = false;
  635. \t\tvar yaMapLoaded = false;
  636. \t\tfunction initMap() {
  637. \t\t\t//console.log('initMap');
  638. \t\t\twindow.ymap = new ym.Map(document.getElementById('map-wrap'), {
  639. \t\t\t\tcenter: [\"{{ lat }}\", \"{{ lon }}\"],
  640. \t\t\t\tzoom: 8,
  641. \t\t\t\tcontrols: ['zoomControl', 'typeSelector',  'fullscreenControl']
  642. \t\t\t});
  643. \t\t\tyaMapLoaded = true;
  644. \t\t\t//if (!isMapInitialized) {
  645. \t\t\t//\tconsole.log('new mapPage initMap');
  646. \t\t\t//\tisMapInitialized = true;
  647. \t\t\t//\tnew MapPage(mapConfig);
  648. \t\t\t//}
  649. \t\t}
  650. \t\twindow.profileShowed = function ({id}) {
  651. \t\t\tif (!id) return;
  652. \t\t\tfetch('{{ path('profile_ctr.increase_shows') }}', {
  653. \t\t\t\tmethod: \"POST\",
  654. \t\t\t\tbody: JSON.stringify({ profiles: [id], source: 'map' }),
  655. \t\t\t});
  656. \t\t}
  657.         window.stations = {
  658. \t\t\t{%- for station in stations() -%}{{- station.id -}}:{icon:`{%- include 'components/metro/icon_generate.partial.twig' with {data: station|station_lines} -%}`,name:`{{- station.name -}}`},{%- endfor -%}
  659. \t\t};
  660.         document.addEventListener('DOMContentLoaded', function () {
  661. \t\t\tfunction loadForm() {
  662. \t\t\t\tfetch('{{ path('map.form', {city: cityUriIdentity}) }}', {
  663. \t\t\t\t\tmode: \"cors\",
  664. \t\t\t\t\timportance: \"low\",
  665. \t\t\t\t\tmethod: \"POST\",
  666. \t\t\t\t\theaders: {
  667. \t\t\t\t\t\t\"Content-Type\": \"application/x-www-form-urlencoded\",
  668. \t\t\t\t\t\t\"X-Requested-With\": \"XMLHttpRequest\"
  669. \t\t\t\t\t},
  670. \t\t\t\t}).then(response => {
  671. \t\t\t\t\tif (response.status < 300) {
  672. \t\t\t\t\t\treturn response.text();
  673. \t\t\t\t\t} else {
  674. \t\t\t\t\t\tconsole.warn(\"🤔\");
  675. \t\t\t\t\t\treturn null;
  676. \t\t\t\t\t}
  677. \t\t\t\t}).then(response => {
  678. \t\t\t\t\tdocument.getElementById('collapseFilter').innerHTML = response;
  679. \t\t\t\t\tfilterLoader()
  680. \t\t\t\t});
  681. \t\t\t}
  682. \t\t\tloadForm();
  683. \t\t\tfunction filterLoader() {
  684. \t\t\t\tconst stringifyData = `{\"city_id\":\"\${document.getElementById('filter_map_form_city_id').value}\",\"_token\":\"\${document.getElementById('filter_map_form__token').value}\"}`;
  685. \t\t\t\tfetch(\"{{ path('map.filter', {city:cityUriIdentity}) }}\", {
  686. \t\t\t\t\tmethod: \"POST\",
  687. \t\t\t\t\theaders: {
  688. \t\t\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  689. \t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest',
  690. \t\t\t\t\t},
  691. \t\t\t\t\tbody: new URLSearchParams({ form: stringifyData }).toString(),
  692. \t\t\t\t})
  693. \t\t\t\t\t.then(response => response.json())
  694. \t\t\t\t\t.then(data => {
  695. \t\t\t\t\t\t//console.log('map-data-loaded')
  696. \t\t\t\t\t\tconst mapLoadedInterval = setInterval(()=>{
  697. \t\t\t\t\t\t\tif (yaMapLoaded) {
  698. \t\t\t\t\t\t\t\tnew MapPage(mapConfig);
  699. \t\t\t\t\t\t\t\tdocument.dispatchEvent(new CustomEvent('map:data:loaded', { detail: { data, stringifyData } }));
  700. \t\t\t\t\t\t\t\tclearInterval(mapLoadedInterval)
  701. \t\t\t\t\t\t\t}
  702. \t\t\t\t\t\t}, 200)
  703. \t\t\t\t\t})
  704. \t\t\t\t\t.catch(error => console.error(error));
  705. \t\t\t\t//if (!isMapInitialized) {
  706. \t\t\t\t//\tconsole.log('new mapPage filterLoader');
  707. \t\t\t\t//\tisMapInitialized = true;
  708. \t\t\t\t//\tnew MapPage(mapConfig);
  709. \t\t\t\t//}
  710. \t\t\t}
  711. \t\t})
  712. \t</script>
  713. {% endblock %}""Map/page.html.twig""/app/templates/Map/page.html.twig");
  714.     }
  715. }