Commit f4b47ed2 authored by Ale's avatar Ale

feat: Add hood search widget

parent 30b95717
<div class="search-hood">
<span class="search-hood__label">
Centra el mapa en tu barrio
</span>
<select class="search-hood__widget">
<option value="37.4218683,-5.9343903">Aeropuerto Viejo</option>
<option value="37.3904821,-5.9930686854364">Alfalfa</option>
<option value="37.4157368,-5.9662075">Las Almenas</option>
<option value="37.378556599999996,-5.957475453736949">Amate</option>
<option value="37.4006679,-5.973566004539996">Árbol Gordo</option>
<option value="37.408457999999996,-5.968024043766782">Los Arcos</option>
<option value="37.3863652,-5.99776037615157">El Arenal</option>
<option value="37.365527900000004,-5.964969396420985">Avenida de la Paz</option>
<option value="37.411016950000004,-5.985207876860748">Las Avenidas</option>
<option value="37.4156897,-5.9888289">La Bachillera</option>
<option value="37.35938915,-5.977464686014208">Bami</option>
<option value="37.4060791,-5.9805276">La Barzola</option>
<option value="37.4077212,-5.975812267289117">Begoña-Santa Catalina</option>
<option value="37.3200489,-5.9851431">Bellavista</option>
<option value="37.346070049999994,-5.979620128981948">Elcano-Los Bermejales</option>
<option value="37.38254065,-5.975241684467645">La Buhaira</option>
<option value="37.389229,-5.9777020223580815">La Calzada</option>
<option value="37.4066826,-5.9709826">Campos de Soria</option>
<option value="37.4061576,-5.984406905297506">El Carmen</option>
<option value="37.4127912,-5.971444972358217">Los Carteros</option>
<option value="37.4095827,-5.9852347">El Cerezo</option>
<option value="37.37214795,-5.959630425253584">El Cerro</option>
<option value="37.4038238,-5.9702043">Cisneo Alto-Santa María de Gracia</option>
<option value="37.37733315,-5.964232493782611">Ciudad Jardín</option>
<option value="37.4172782,-5.9708714">Colores-Entreparques</option>
<option value="37.4183529,-5.9670892">Consolación</option>
<option value="7.40161455,-5.968041152384302">La Corza</option>
<option value="37.40040365,-5.980594445012147">Cruz Roja-Capuchinos</option>
<option value="37.4061576,-5.990275870137976">Doctor Barraquer-Grupo Renfe-Policlínico</option>
<option value="37.39449555,-5.993212974898399">Encarnación-Regina</option>
<option value="37.370892850000004,-5.973101635118603">Felipe II-Los Diez Mandamientos</option>
<option value="37.39768945,-5.991047623687235">Feria</option>
<option value="37.3867346,-5.983360410962498">La Florida</option>
<option value="37.3971327,-5.979534421951376">Fontanal-María Auxiliadora-Carretera de Carmona</option>
<option value="37.37536625,-5.976966677516396">Giralda Sur</option>
<option value="37.4470695,-5.938890604944831">El Gordillo</option>
<option value="37.3541692,-5.9863819">Heliópolis</option>
<option value="37.40922175,-5.980599534724817">Hermandades-La Carrasca</option>
<option value="37.3855343,-5.977757246351786">Huerta del Pilar</option>
<option value="37.3898856,-5.9713524">Huerta de Santa Teresa</option>
<option value="37.375275099999996,-5.982004269610078">Huerta de la Salud</option>
<option value="37.39812485,-5.96753369223646">Las Huertas</option>
<option value="37.3757152,-5.948730718612621">Juan XXIII</option>
<option value="37.3741669,-5.9700181">El Juncal-Híspalis</option>
<option value="37.3790994,-6.0150157">León</option>
<option value="37.4042071,-5.9839543">León XIII-Los Naranjos</option>
<option value="37.3705011,-5.947729466927606">La Plata</option>
<option value="37.362706,-5.964321554880675">Las Letanías</option>
<option value="37.3834516,-6.0040669">La Rosaleda</option>
<option value="37.3862393,-5.9832207">Los Granados</option>
<option value="37.4089145,-5.9923255">Macarena 3 Huertas-Macarena 5</option>
<option value="37.3925026,-6.008777">Museo</option>
<option value="37.40487185,-5.966478921375879">Las Naciones-Parque Atlántico-Las Dalias</option>
<option value="37.3833173,-5.973617779639808">Nervión</option>
<option value="37.3658199,-5.9720136">La Oliva</option>
<option value="37.3770179,-5.9307408">Palmete</option>
<option value="37.3714358,-5.943845">Padre Pío</option>
<option value="37.3840402,-5.956732511734637">Los Pájaros</option>
<option value="37.40832225,-5.986647939851695">La Palmilla-Doctor Marañón</option>
<option value="37.4087376,-5.9354743">Parque Alcosa-Jardines del Edén</option>
<option value="37.411016950000004,-5.9878831704397415">La Paz-Las Golondrinas</option>
<option value="37.3562375,-5.976616060788755">Pedro Salvador-Las Palmeritas</option>
<option value="37.3024727,-6.3012363">Pineda</option>
<option value="37.4078411,-5.97253566639805">Pino Flores</option>
<option value="37.4234233,-5.965486">Pino Montano</option>
<option value="37.405140700000004,-5.977736643101543">Pío XII</option>
<option value="37.373687849999996,-5.970915569789319">El Plantinar</option>
<option value="37.373687849999996,-5.970915569789319">La Plata</option>
<option value="37.41225515,-5.979767453167345">Polígono Norte</option>
<option value="37.3580471,-5.9650838">Polígono Sur</option>
<option value="37.37151565,-5.981920499512796">El Porvenir</option>
<option value="37.41546745,-5.977287041227621">Los Príncipes-La Fontanilla</option>
<option value="37.3507159,-6.008139750430546">Los Remedios</option>
<option value="37.402212199999994,-5.979298016911155">Retiro Obrero</option>
<option value="37.37544115,-5.954245586171375">Rochelambert</option>
<option value="37.408167649999996,-5.9818012840199675">El Rocío</option>
<option value="37.38242625,-5.984517219943806">San Bernardo</option>
<option value="37.3985694,-5.9715647404827505">San Carlos-Tartessos</option>
<option value="37.412789,-5.9680824">San Diego</option>
<option value="37.40167375,-5.9910316943760495">San Gil</option>
<option value="37.42301045,-5.985672745349913">San Jerónimo</option>
<option value="37.397670149999996,-5.984673035035413">San Julián</option>
<option value="37.40030765,-5.9968568599153835">San Lorenzo</option>
<option value="37.40392825,-5.967331243156394">San Matías</option>
<option value="37.3962534,-5.9722325">Barriada de San Pablo</option>
<option value="37.3916667,-5.9857998">San Roque</option>
<option value="37.3959323,-5.9995759">San Vicente</option>
<option value="37.35948325,-5.986303243489271">Sector Sur-La Palmera-Reina Mercedes</option>
<option value="37.38295155,-5.9478113083145026">Santa Aurelia-Cantábrico-Atlántico-La Romería</option>
<option value="37.3937603,-5.986014127432396">Santa Catalina</option>
<option value="37.39721405,-5.950531194820888">Santa Clara</option>
<option value="37.3860358,-5.9916107">Santa Cruz</option>
<option value="37.403433,-5.9756264">Santa María de Ordaz-San Nicolás</option>
<option value="37.4096,-5.9756287">Santas Justa y Rufina-Parque Miraflores</option>
<option value="37.3834516,-6.0040669">Tablada</option>
<option value="37.36483475,-5.980133011098179">Tabladilla-La Estrella</option>
<option value="37.3447217,-5.9740721">El Tardón-El Carmen</option>
<option value="37.36919785,-5.974665612075511">Tiro de Línea-Santa Genoveva</option>
<option value="37.3884083,-5.9125159">Torreblanca</option>
<option value="37.4122742,-5.982895625660165">El Torrejón</option>
<option value="37.3789647,-6.0174968">Triana</option>
<option value="37.42840885,-5.925477437513345">Valdezorras</option>
<option value="37.4108348,-5.973362604367187">Villegas</option>
<option value="37.4012246,-5.970263648236347o">Zodiaco
</select>
</div>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -162,7 +162,7 @@ const init_map = function(items)
scrollWheelZoom : !is_mobile, // disable wheelzoom only in small devices
zoomControl : false,
minZoom: 12,
maxZoom: 16
maxZoom: 17
}).setView(
...MAP_DEFAULTS.view
);
......@@ -463,4 +463,9 @@ window.onload = ()=>{
document.querySelector('.site-logo').addEventListener('click', function(e){
show_all_timeline_items();
});
const hoodsearch = document.querySelector('.search-hood__widget');
if(hoodsearch) hoodsearch.addEventListener('change', function(e){
var latlon = hoodsearch.value.split(",");
map.setView(latlon, 17);
});
};
......@@ -355,7 +355,7 @@ select:hover {
::-webkit-scrollbar {
height: 1.6rem;
width: 0.53333rem;
width: 0.5333333333rem;
background: white; }
::-webkit-scrollbar-thumb {
......@@ -443,6 +443,9 @@ select:hover {
.width-three-col {
width: 60vw; } }
.map-wrapper {
position: relative; }
/* No files to import found in components/* */
.legend {
position: absolute;
......@@ -621,6 +624,18 @@ select:hover {
@media screen and (min-width: 768px) {
.leaflet-popup {
display: none; } }
.search-hood {
position: absolute;
z-index: 150000;
left: 1.6rem;
top: 1.6rem;
font-size: 1.4rem;
background: white; }
.search-hood__label {
font-weight: bold;
padding: 0 0.8rem; }
.share img {
max-width: 20px; }
......@@ -674,7 +689,7 @@ select:hover {
.timeline-item__terms {
font-size: 1.4rem;
margin-top: 0.53333rem; }
margin-top: 0.5333333333rem; }
.timeline-item__date {
font-size: 1.4rem;
......
This diff is collapsed.
......@@ -70,3 +70,6 @@
width: 50vw
+breakpoint('xl')
width: 60vw
.map-wrapper
position: relative
.search-hood
position: absolute
z-index: 150000
left: $m
top: $m
font-size: 1.4rem
background: white
.search-hood__label
font-weight: bold
padding: 0 $m/2
......@@ -61,6 +61,7 @@
{% block right %}
<div class="map-wrapper">
{% include 'hood-search.html' %}
<div id="map" class="full-height">
<div class="legend">
<h4 class="legend__label">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment