1/** 2 * @file 3 * JavaScript para el mapa interactivo de localidades de Bogotá. 4 */ 5 6(function ($, Drupal, once) { 7 'use strict'; 8 9 Drupal.behaviors.mapaLocalidades = { 10 attach: function (context, settings) { 11 once('mapa-localidades', '.mapa-localidades-container', context).forEach(function (element) { 12 if (typeof Raphael === 'undefined') { 13 console.error('Raphael no está cargado'); 14 return; 15 } 16 17 var mapContainer = element.querySelector('.mapcontainer'); 18 if (!mapContainer) { 19 console.error('Contenedor del mapa no encontrado'); 20 return; 21 } 22 23 var defaultColor = '#ffc107'; 24 var localidades = { 25 fontibon: { 26 path: "M393.16,150.6C402.57,143.03,427.93,132.17,408.56,122.83C367.34,145.08,323.61,168.21,279.74,191.33C273.2,190.35,271.34,184.72,263.7,184.64C242.64,200.45,219.96,223.6,199.64,244.11C204.53,248.38,203.3,254.26,203.28,258.22C206.52,259.69,215.17,256.92,217.93,258.79C221.1,262.79,218.24,265.28,220.13,270.36C228.43,271.65,231.39,277.28,232.89,284.13C247.75,280.62,250.35,289.77,263.1,288.36C273.42,287.23,277.93,277.91,289.08,278.86C301.7,279.9,297.55,295.9,319.03,291.29C327.36,285.72,331.34,277.91,347.18,276.44C347.93,270.7,347.2,264.24,345.99,257.57C354.45,256.86,360.19,254.78,364.42,251.89C364.29,246.79,358.75,246.92,357.12,242.82C354.53,236.4,359.41,229.82,357.13,223.64C355.94,220.47,350.9,219.27,351.57,215.69C361.58,192.42,399.25,183.32,420.09,166.45C414.48,158.31,399.29,158.08,393.17,150.59Z", 27 nombre: "Fontibón", 28 tooltip: 29 "<div class=contesgdmap><h1>Alcaldesa Local</h1><p>Paola Andrea Osorio Lozano</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Carrera 99 No. 19 - 43<br>Teléfono: +57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes de 7:00 a.m a 4:30 p.m.</p></div>", 30 href: "http://www.fontibon.gov.co/", 31 }, 32 ciudadbolivar: { 33 path: "M781.8,192.6C781.72,189.22,786.39,187.9,784,183.57C771.28,176.7,750.6,177.89,740.9,168.35C742.13,158.38,758.95,156.77,752.72,143.9C735.39,144.49,736.13,150.91,722.6,153.13L725.9,161.24C688.96,179.37,649.83,197.22,610.45,215.6L616.12,240.34C604.6,242.23,594.51,241.29,583.29,242.9C584.63,258.89,589.12,272.78,596.8,288.62C602.87,288.66,607.29,290.27,614.59,289.14C619.48,283.18,610.13,272.36,609.72,268.09C613.14,258.29,642.15,258.68,657.56,259.34C663.07,257.62,658.05,251,665.49,250.2L669.01,260.37C680.38,259.66,685.93,256.24,687.96,251.22C682.7,243.68,669.42,238.4,670.64,229.08C686.83,227.32,699.99,228.79,707.2,222.59C715.64,228.24,725.35,232.69,736.02,236.3C743.09,232.63,749.7,228.76,764.33,228.49C763.37,223.39,757.78,223.03,755.74,219.07C750.43,218.91,742.28,221.63,738.79,219.63C738.98,217.84,734.69,214.08,737.94,213.65C745.14,212.65,750.65,215.87,759.44,216.68C762.58,212.22,773.4,211.11,784.82,210.25C787.31,206.36,793.44,204.04,790.24,197.74C789.08,194.34,782.44,196.51,781.81,192.6Z", 34 nombre: "Ciudad BolÃvar", 35 tooltip: 36 "<div class=contesgdmap><h1>Alcalde Local</h1><p>Diego Arley Arenas Manrique</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Diagonal 62 Sur No. 20F - 20<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 37 href: "http://www.ciudadbolivar.gov.co/", 38 }, 39 kennedy: { 40 path: "M504.77,170.15C518.45,182.18,545.21,183.02,565.16,190.09C578.77,214.29,541.01,227.91,550.78,249.3C554.03,256.41,564.46,259.7,565.12,268.2C553.31,274.9,543.26,282.53,528.96,288.17C529.81,296.51,538.92,301.8,536.01,309.8C517.34,309.87,517.48,291.74,517.92,280.88C504.3,276.12,484.94,276.68,477.9,266.2C458.42,271.62,443.71,291.13,424,276.34C427.16,271.06,438.43,269.95,441.32,264.59C438.71,258.78,430.54,257.86,427.02,252.95C430.09,246.63,440.03,243.79,444.94,238.49C443.76,230.89,435.11,221.28,430.89,212.96C419.91,215.1,413.85,213.05,408.58,210.35C387.3,214.04,378.01,207.75,368.17,202.05C386.53,190.16,406.85,179.47,424.6,167.82C447.73,170.67,476.54,181.55,504.78,170.14Z", 41 nombre: "Kennedy", 42 tooltip: 43 "<div class=contesgdmap><h1>Alcalde Local (E.)</h1><p>Javier Prieto Tristancho</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Transversal 78 K No. 41A-04 Sur<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 44 href: "http://www.kennedy.gov.co/", 45 }, 46 tunjuelito: {
47 path: "M717.83,151.3C725.55,149.37,729.82,144.73,735.15,144.62C695.08,145.39,672.13,152.04,653.35,163.14C629.95,156.16,619.19,173.38,593.21,174.39C594.28,171.32,579.79,161.76,578.49,161.96C572.04,163.49,574.04,166.07,566.12,166.95C570.9,179.68,572.6,202.37,581.07,239.61L610.82,237.26L605.98,214.56C643.93,196.1,683.45,178.96,718.57,160.55C716.63,156.72,721.18,155.67,717.84,151.29Z", 48 nombre: "Tunjuelito", 49 tooltip: 50 "<div class=contesgdmap><h1>Alcaldesa Local</h1><p>Claudia Verónica Collante Dussán</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Dg. 50a Sur No. 18 - 24<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 51 href: "http://www.tunjuelito.gov.co/", 52 }, 53 puentearanda: { 54 path: "M563.84,185.58C541.25,181.68,517.31,179.14,506.43,165.51C463.78,180.25,423.76,164.39,401.38,149.84C408.9,144.12,418.01,139.22,424.43,133.12C421.25,128.6,417.81,124.32,414.79,119.75C428.29,113.39,440.99,106.76,452.67,99.76C498.21,115.41,557.6,125.92,563.84,185.59Z", 55 nombre: "Puente\nAranda", 56 tooltip: 57 "<div class=contesgdmap><h1>Alcalde Local</h1><p>VÃctor Alfonso Cruz Sanchez</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Carrera 31D No. 4-05<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 58 href: "http://www.puentearanda.gov.co/", 59 }, 60 engativa: { 61 path: "M271.05,108.84C259.46,119.29,244.21,129.08,216.59,128.35C184.91,149.06,153.9,171.06,121.81,193.49C122.54,198.35,120.71,205.56,121.82,207.8C135.66,208.95,153.14,197.18,159.71,207.86C149.27,212.63,153.08,225.3,146.05,232.14C152.05,237.08,155.76,243.86,159.37,250.76C163.75,250.64,170.56,248.65,170.98,251.58C175.31,257.81,166.24,262.97,167.19,270.4C181.53,266,189.45,258.09,198.52,250.92C196.34,248.65,190.84,248.97,190.99,244.92C197.94,233.85,212.75,224.83,227.72,210.59C240.44,198.5,263.03,166.16,280.65,185.73C309.56,170.76,338.48,157.8,364.13,142.21C358.09,139.61,291.13,112.91,271.04,108.82Z", 62 nombre: "Engativá", 63 tooltip: 64 "<div class=contesgdmap><h1>Alcalde Local</h1><p>VÃctor Hugo Huertas Prada</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Calle 71 No. 73A - 44<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 65 href: "http://www.engativa.gov.co/", 66 }, 67 sancristobal: { 68 path: "M738.72,91.39C748.21,87.8,761.56,75.35,750.55,70.3C734.69,63.01,698.11,60.08,673.75,63.81C670.44,65.5,672.88,69.51,668.31,70.71C660.9,71,651.34,73.18,645.6,72.03C643.73,67.16,642.33,61.94,639.1,58.34C642.17,56.35,652.21,57.15,650.69,53.33C635.29,42.65,599.46,50.45,585.35,58.65C585.5,62.86,586.66,67.51,588.67,72.55C577.86,79.47,567.91,86.85,558.8,94.69L557.89,95.48C571.81,97.91,583.15,103.8,596.76,107.49C597.28,107.63,598.12,106.33,598.47,105.91C620.01,111.55,638.82,119.32,657.43,128.19C670,118.5,681.8,113.64,694.11,104.08C699.36,100.56,710.15,97.71,721.8,95.19C724.58,94.61,737.83,91.73,738.72,91.38Z", 69 nombre: "San Cristóbal", 70 tooltip: 71 "<div class=contesgdmap><h1>Alcalde Local</h1><p>Carlos Hernando MacÃas Montoya</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Avenida 1 de Mayo No. 1 - 40 Sur<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 72 href: "http://www.sancristobal.gov.co/", 73 }, 74 usme: { 75 path: "M781.11,73.02C780.31,73.64,776.99,72.9,776.33,73.57C757.04,74.99,755.96,90.44,741.39,93.89C740.5,94.1,724.12,97.28,722.79,97.64C711.45,100.74,700.46,103.73,695.19,107.26C682.89,116.85,673.53,118.78,660.96,128.49C666.99,131.38,669.89,134.22,675.85,137.23C684.68,138.53,696.71,137.13,708.26,135.97C710.43,137.84,712.38,139.92,713.78,142.54C725.18,143.6,742.01,139.49,753.37,140.61C758.7,150.14,773.97,150.03,788.41,150.82C797.89,141.45,822.81,146.55,843.57,143.84C830.5,126.09,856.46,121.24,882.61,123.18C884.53,118.07,874.83,110.9,875.69,104.59C879.72,103.1,882.17,101,883.98,98.66C881.39,95,880.56,89.61,876.55,87.45C853.98,90.42,834.6,90.25,818.39,87.01C812.21,87.51,804.89,89.12,802.43,86.01C802.73,85.09,803.02,85.18,803.4,84.28C803.47,84.07,803.57,83.85,803.66,83.65C794.77,81.3,789.41,75.78,781.12,73.02Z", 76 nombre: "Usme", 77 tooltip: 78 "<div class=contesgdmap><h1>Alcaldesa Local</h1><p>Leidi Marcela Pinilla Pinilla</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Calle 137B Sur No. 14 - 24<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 79 href: "http://www.usme.gov.co/", 80 }, 81 martires: { 82 path: "M551.53,97.06C541.29,106.12,533.82,113.68,524.9,123.08C498.98,110.59,476.96,103.82,450.31,96.71C450.02,93.05,447.94,87.58,448.82,83.24C470.09,70.59,485.49,80.72,513.48,87.68C522.33,89.88,545.06,95.27,551.53,97.07Z", 83 nombre: "Mártires", 84 tooltip: 85 "<div class=contesgdmap><h1>Alcalde Local</h1><p>John Jader Suárez Delgado</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>
85Calle 13 No. 19-71 Piso 2<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 86 href: "http://www.martires.gov.co/", 87 }, 88 chapinero: { 89 path: "M382.77,45.49C395.3,42.7,402.46,47.7,411.07,50.36C421.03,49.95,427.54,48.07,436.5,47.24L439.43,71.51C383.19,70.25,321.65,69.71,268.77,68.81C278.98,68.98,285.06,48.32,277.79,39.04C290.63,36.54,303.18,31.47,316.39,32.53C326.48,33.34,334.82,41.81,351.11,41.76C359.35,41.73,363.79,39.39,375.32,40.23C380.71,39.79,379.11,44.62,382.77,45.49Z", 90 nombre: "Chapinero", 91 tooltip: 92 "<div class=contesgdmap><h1>Alcalde Local</h1><p>Catherine Chaves Hernández</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Carrera 13 54 - 74<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 93 href: "http://www.chapinero.gov.co/", 94 }, 95 suba: { 96 path: "M246.73,73.54C246.59,85.43,249.75,96.32,249.75,105.81C251.13,108.75,259.42,106.5,263.05,107.77C230.06,133.55,226.63,120.95,209.33,127.39C209.33,127.39,182.54,146.1,161.5,161.11C142.21,174.87,125.86,185.79,111.75,195.33C112.1,202.07,111.71,208.48,108.87,213.54C78.82,214.64,96.72,191.09,90.26,177.2C88.09,172.5,60.34,160.14,50.76,159.61C42.55,159.17,37.01,161.51,29.37,163.28C21.9,156.43,8.87,153.57,2.99,145.84C15.52,136.88,32.28,130.42,44.78,121.74L110.89,115.57C107.11,97.63,59.23,110.55,28.7,111.42C10.4,106.84,13.15,90.45,15.15,72.91L246.73,73.54Z", 97 nombre: "Suba", 98 tooltip: 99 "<div class=contesgdmap><h1>Alcalde Local</h1><p>César Augusto Salamanca Rojas</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Calle 146C Bis 90-57<br>Conmutador: +57 (601) 662 0222 - 682 4547</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 100 href: "http://www.suba.gov.co/", 101 }, 102 usaquen: { 103 path: "M15.87,53.72C18.44,49.23,16.87,42.51,22.64,39.85C33.83,38.37,42.78,37.12,52.94,37.5C55.91,29.85,52.69,19.05,63.06,15.48C81.67,14.16,86.86,22.18,103.75,22.16C109.85,17.22,113.25,6.44,127.21,9.73C129.26,10.97,127.94,14.55,128.29,17C135.49,15.93,132.11,9.52,136.06,6.84L159.25,4.52L159.44,13.88C174.97,15.57,188.52,18.76,208.87,17.07C211.35,16.52,209.12,13.69,209.71,12.22C214.98,11.51,218.21,9.81,224.12,9.42C224.61,12.13,226.55,13.78,227.95,15.84C240.66,16.24,259.15,12.32,270.71,13.6C271.34,16.06,270.39,19.73,272.63,20.99C282.36,22.54,293.34,23.16,294.46,31.41C286.81,34.14,274.92,34.81,272.35,40.02C280.39,50.4,268.68,59.53,263.48,67.85C177.78,69.48,98.5,67.09,15.78,67.91C15.24,66.02,17.72,62.05,15.19,61.55L15.87,53.71Z", 104 nombre: "Usaquén", 105 tooltip: 106 "<div class=contesgdmap><h1>Alcalde Local</h1><p>Daniel Hernando Ortiz Quintero</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Carrera 6A No. 118-03<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 107 href: "http://www.usaquen.gov.co/", 108 }, 109 santafe: { 110 path: "M577.35,54.74C580.6,56.48,580.86,65.37,582.64,70.73C572.09,77.93,561.82,85.37,551.64,92.95C537.24,89.97,522.19,85.56,504.78,81.19C484.39,76.05,471.81,67.21,447.81,78.07C442.19,70.85,443.35,57.01,441.94,48.23C456.6,50.97,472.65,51.32,489.23,49.47C490.96,49.28,497.7,55.22,499.43,54.83C499.26,54.38,572.65,52.24,577.34,54.74Z", 111 nombre: "Santa Fe", 112 tooltip: 113 "<div class=contesgdmap><h1>Alcalde Local</h1><p>Diego Alejandro López López</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Calle 21 No. 5-74<br>Conmutador: +57 (601) 382 1640</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a viernes de 7:00 AM a 4:30 PM<br>Sábado de 8:00 AM a 12:00 PM</p></div>", 114 href: "http://www.santafe.gov.co/", 115 }, 116 bosa: { 117 path: "M568.05,220.16C574.79,254.95,601.36,303.16,593.99,337.23L502.18,345.86C495.4,337.69,492.34,326.25,485.06,318.88C472.45,320.59,468.43,331.48,456.17,330.3C450.29,316.14,472.39,316.69,476.41,307.9C474.59,299.6,466,297.55,464.63,289.01C475.03,284.06,490.89,281.9,506.95,279.85C514.13,293.59,511.69,316.73,538.34,312.8C545.55,307.92,542.78,300.1,537.83,292.59C545.17,282.58,562.55,277.67,569.6,267.78C559.61,249.9,551.09,230.33,568.05,220.15Z", 118 nombre: "Bosa", 119 tooltip: 120 "<div class=contesgdmap><h1>Alcalde Local</h1><p>Fabián Ernesto RamÃrez Cruz</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Carrera 80 No. 61-05 Sur<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 121 href: "http://www.bosa.gov.co", 122 }, 123 rafaeluribe: { 124 path: "M598.55,171.09C618.1,168.02,628.23,154.33,651.72,159.77C661.5,148.63,687.24,146.64,710.67,143.32C707.96,136.59,705.15,141,672.38,139.86C666.64,130.12,607.83,114.05,601.48,109.91C601.48,109.91,584.72,127.46,579.48,131.66C582.44,142.03,579.42,152.8,585.65,162.5C587.65,164.64,591.07,166.3,592.88,168.53C594.47,169.92,595.9,170.64,598.56,171.
1241Z", 125 nombre: "Rafael\nUribe Uribe", 126 tooltip: 127 "<div class=contesgdmap><h1>Alcaldesa Local</h1><p>Diana Carolina Sánchez Castillo</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Calle 32 Sur # 23 - 62<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 128 href: "http://www.rafaeluribe.gov.co/", 129 }, 130 antonionarino: { 131 path: "M553.52,99.09C544.17,107.49,535.16,115.54,527.53,124.95C556.5,143.1,557.79,151.26,566.21,164.39C584.04,160.8,575.56,142.52,576.06,130.37C583.73,123.46,589.5,118.34,596.64,110.4C596.87,110.15,563.91,101.21,555.81,97.17C554.75,98.1,554.56,98.14,553.52,99.08Z", 132 nombre: "Antonio\nNariño", 133 tooltip: 134 "<div class=contesgdmap><h1>Alcaldesa Local</h1><p>Luisa MarÃa RamÃrez Riascos</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Calle 17 Sur # 18 - 49<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 135 href: "http://www.antonionarino.gov.co/", 136 }, 137 teusaquillo: { 138 path: "M446.42,99.1C441.71,92.43,441.57,82.57,437.79,74.6C412.41,74.99,389.41,73.61,363.54,74.5C364.79,81.19,363.4,86.75,365.59,93.99C349.64,102.46,332.63,111.96,315.22,120.1C320.47,121.35,358.33,137.35,369.83,139.9C395.39,126.04,422.36,112.86,446.43,99.1Z", 139 nombre: "Teusaquillo", 140 tooltip: 141 "<div class=contesgdmap><h1>Alcaldesa Local</h1><p>MarÃa Angélica González Russi</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Transversal 18 bis #38-41 - Parque del Brasil<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 142 href: "http://www.teusaquillo.gov.co/", 143 }, 144 bunidos: { 145 path: "M360.54,74.2C359.61,79.66,361.37,86.41,362.43,92.89C346.85,101.27,329.31,108.95,313.09,117.35C292.93,112.2,279.88,104.37,257.38,104.29C256.23,92.42,254.29,91.97,254.76,73.12C291.13,71.71,326.29,73.78,360.55,74.19Z", 146 nombre: "Barrios\nUnidos", 147 tooltip: 148 "<div class=contesgdmap><h1>Alcaldesa Local</h1><p>Andrea Melissa Morales Cano</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Calle 74A No. 63-04<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 149 href: "http://www.barriosunidos.gov.co/", 150 }, 151 candelaria: { 152 path: "M497.7,50.17C495.95,45.19,494.2,39.22,494.2,39.22C494.63,32.83,508.59,38.29,524.77,35.11C530.24,35.6,539.67,38.52,541.81,34.09C555.67,37.66,562.92,34.32,577.04,36.33C578.92,38.16,580.76,49.31,576.66,49.37C562.6,49.55,497.86,50.61,497.69,50.16Z", 153 nombre: "La Candelaria", 154 tooltip: 155 "<div class=contesgdmap><h1>Alcaldesa Local</h1><p>Angélica MarÃa Angarita Serrano</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Carrera 5 No. 12C - 40<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 156 href: "http://www.lacandelaria.gov.co/", 157 }, 158 sumapaz: { 159 path: "M808.34,77.99C810.96,83.68,823.5,79.04,829.59,78.49C830.95,80.3,833.2,81.27,833.74,83.91C848.5,83.05,867.69,83.94,881.19,80.31C878.72,74.61,872.67,66.2,871.84,63.03L889.1,61.42C886.75,57.05,887.45,55.22,884.4,52.95C880.01,51.77,872.62,53.57,866.83,53.78L861.88,44.66C845.48,45.88,831.67,48.05,819.8,50.97C816.49,52.86,825.17,55.41,821.59,57.21C813.94,56.17,802.68,58.62,793.54,59.02C793.01,64.45,787.46,66.28,782.44,70.03C782.09,70.28,787.6,72.06,787.28,72.32C795.62,75.09,795.99,77.44,804.15,81.16C805.98,82,805.79,79.15,808.36,77.99Z", 160 nombre: "Sumapaz", 161 tooltip: 162 "<div class=contesgdmap><h1>Alcalde Local</h1><p>Diego Ramiro GarcÃa Bejarano</p></div><div class=contesgdmap><h1>Datos de Contacto</h1><p>Calle 19 sur No. 69C-17 Barrio Carvajal Sector 2<br>+57 (601) 338 7000</p></div><div class=contesgdmap><h1>Horarios de Atención</h1><p>Lunes a Viernes 7:00 AM - 4:30 PM</p></div>", 163 href: "http://www.sumapaz.gov.co", 164 }, 165 }; 166 167 var isMobile = window.innerWidth <= 768; 168 var isTablet = window.innerWidth > 768 && window.innerWidth <= 1024; 169 var baseWidth = 900; 170 var baseHeight = 380; 171 var scale = 1; 172 var width, height; 173 174 if (isMobile) { 175 width = Math.min(window.innerWidth - 8, 280);
176 scale = width / baseWidth; 177 height = baseHeight * scale; 178 } else if (isTablet) { 179 width = Math.min(window.innerWidth - 40, 650); 180 scale = width / baseWidth; 181 height = baseHeight * scale; 182 } else { 183 width = baseWidth; 184 height = baseHeight; 185 } 186 187 var paper = Raphael(mapContainer, width, height); 188 if (scale !== 1) { 189 paper.setViewBox(0, 0, baseWidth, baseHeight, true); 190 } 191 paper.canvas.style.filter = 'drop-shadow(15px 15px 8px rgba(0,0,0,0.25))'; 192 193 // Tooltip 194 var tooltipTimeout; 195 var $tooltip = $('<div class="mapael mapTooltip"></div>').appendTo('body').hide(); 196 197 var tooltip = { 198 show: function (content, event) { 199 clearTimeout(tooltipTimeout); 200 $tooltip.html(content).stop(true, true); 201 if (isMobile) { 202 $tooltip.slideDown(200); 203 } else { 204 this.updatePosition(event); 205 $tooltip.fadeIn(150); 206 } 207 }, 208 hide: function () { 209 if (isMobile) { 210 tooltipTimeout = setTimeout(function () { 211 $tooltip.stop(true, true).slideUp(200); 212 }, 1000); 213 } else { 214 $tooltip.stop(true, true).fadeOut(100); 215 } 216 }, 217 updatePosition: function (event) { 218 if (!isMobile) { 219 var left = Math.min(Math.max(event.pageX - 160, 10), window.innerWidth - 330); 220 var top = event.pageY + 20; 221 $tooltip.css({ left: left, top: top }); 222 } 223 } 224 }; 225 226 // Calcular centroides 227 Object.keys(localidades).forEach(function (key) { 228 var tempPath = paper.path(localidades[key].path); 229 var bbox = tempPath.getBBox(); 230 localidades[key].centroid = { 231 x: bbox.x + bbox.width / 2, 232 y: bbox.y + bbox.height / 2 233 }; 234 tempPath.remove(); 235 }); 236 237 // Dibujar localidades 238 Object.keys(localidades).forEach(function (key) { 239 drawLocalidad(localidades[key]); 240 }); 241 242 function drawLocalidad(loc) { 243 var path = paper.path(loc.path); 244 path.attr({ 245 fill: defaultColor, 246 'fill-opacity': 0.8, 247 stroke: '#fff', 248 'stroke-width': 0.8, 249 cursor: 'pointer' 250 }); 251 252 if (loc.centroid) { 253 var cx = loc.centroid.x; 254 var cy = loc.centroid.y; 255 256 // Ajustes de posición para cada localidad 257 if (loc.nombre === 'Engativá') { cx -= isMobile ? 10 : 30; cy -= 10; } 258 if (loc.nombre === 'Antonio\nNariño') { cy -= 5; } 259 if (loc.nombre === 'Ciudad BolÃvar') { cy -= 5; } 260 if (loc.nombre === 'Santa Fe') { cx += isMobile ? 8 : 15; cy += 2; } 261 if (loc.nombre === 'Mártires') { cx -= isMobile ? 3 : 5; } 262 if (loc.nombre === 'Fontibón') { cy += 20; } 263 if (loc.nombre === 'Tunjuelito') { cx -= 40; cy += 10; } 264 if (loc.nombre === 'Kennedy') { cx += 20; } 265 if (loc.nombre === 'Bosa') { cx += 30; cy -= 15; } 266 if (loc.nombre === 'Rafael\nUribe Uribe') { cx -= isMobile ? 10 : 25; cy -= 5; } 267 268 var pinY = (loc.nombre === 'Bosa') ? cy + 20 : cy - 23; 269 var pinPath = 'M' + cx + ',' + pinY + 270 'C' + (cx - 6) + ',' + pinY + ' ' + (cx - 8) + ',' + (pinY + 2) + ' ' + (cx - 8) + ',' + (pinY + 7) + 271 'C' + (cx - 8) + ',' + (pinY + 12) + ' ' + (cx - 6) + ',' + (pinY + 14) + ' ' + cx + ',' + (pinY + 20) + 272 'C' + (cx + 6) + ',' + (pinY + 14) + ' ' + (cx + 8) + ',' + (pinY + 12) + ' ' + (cx + 8) + ',' + (pinY + 7) + 273 'C' + (cx + 8) + ',' + (pinY + 2) + ' ' + (cx + 6) + ',' + pinY + ' ' + cx + ',' + pinY + 'Z'; 274 275 var pin = paper.path(pinPath).attr({ 276 fill: '#ff5722', 277 stroke: '#fff', 278 'stroke-width': 1.2, 279 cursor: 'pointer' 280 }); 281 282 var pinDot = paper.circle(cx, pinY + 7, 4).attr({ 283 fill: '#fff', 284 stroke: '#ff5722', 285 'stroke-width': 1, 286 cursor: 'pointer' 287 }); 288 289 var fontSize = isMobile ? '15.5px' : (isTablet ? '9.5px' : '12.5px'); 290 if (loc.nombre === 'La Candelaria') { 291 fontSize = isMobile ? '10.5px' : (isTablet ? '8.5px' : '11.5px'); 292 } 293 294 var textX = cx; 295 var textY = pinY + 27; 296 297 if (loc.nombre === 'Engativá') { textY -= 3; } 298 if (loc.nombre === 'Barrios\nUnidos') { textY += 10; } 299 if (loc.nombre === 'Puente\nAranda') { textY += 6; } 300 if (loc.nombre === 'Fontibón') { textY += 3; } 301 if (loc.nombre === 'Tunjuelito') { textX -= 8; } 302 if (loc.nombre === 'Antonio\nNariño' || loc.nombre === 'Rafael\nUribe Uribe') { textY += 8; } 303 if (loc.nombre === 'Ciudad BolÃvar') { textX += 8; } 304 305 var label = paper.text(textX, textY, loc.nombre).attr({ 306 'font-size': fontSize, 307 'font-weight': 'bold', 308 fill: '#bf0a00', 309 'text-anchor': 'middle', 310 cursor: 'pointer' 311 }); 312 313 var onHover = function (event) { 314 path.attr({ fill: '#edb100', 'fill-opacity': 1 }); 315 if (loc.tooltip) { 316 tooltip.show(loc.tooltip, event); 317 } 318 }; 319 320 var onLeave = function () { 321 path.attr({ fill: defaultColor, 'fill-opacity': 0.8 }); 322 pin.attr({ fill: '#ff5722' }); 323 tooltip.hide(); 324 }; 325 326 var onClick = function () { 327 if (loc.href) { 328 window.open(loc.href, '_blank'); 329 } 330 }; 331 332 [path, pin, pinDot, label].forEach(function (el) { 333 $(el.node).on({ 334 mouseenter: onHover, 335 mouseleave: onLeave, 336 mousemove: function (e) { 337 tooltip.updatePosition(e); 338 }, 339 click: onClick, 340 touchstart: function (e) { 341 e.preventDefault(); 342 onHover(e.originalEvent.touches[0]); 343 }, 344 touchend: function (e) { 345 e.preventDefault(); 346 onClick(); 347 onLeave(); 348 } 349 }); 350 }); 351 352 pin.toFront(); 353 pinDot.toFront(); 354 label.toFront(); 355 } 356 } 357 358 // Resize handler 359 var resizeTimeout; 360 $(window).on('resize', function () { 361 clearTimeout(resizeTimeout); 362 resizeTimeout = setTimeout(function () { 363 if (Math.abs(window.innerWidth - width) > 50) { 364 location.reload(); 365 } 366 }, 250); 367 }); 368 }); 369 } 370 }; 371 372})(jQuery, Drupal, once);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.