Gustavo Luigi 2023-08-01 18:51:06 -03:00
parent 1507505ddf
commit 04c15dc462
1 changed files with 10 additions and 5 deletions

View File

@ -156,9 +156,8 @@ function initMap() {
}); });


locationElement.on('click', function () { locationElement.on('click', function () {
map.setZoom(12); $("#search-input").val(item.title);
map.setCenter(item.marker.getPosition()); $("#search-button").trigger("click");
showVisibleMarkers();
google.maps.event.trigger(item.marker, 'click'); google.maps.event.trigger(item.marker, 'click');
}); });
$("#contents").append(locationElement); $("#contents").append(locationElement);
@ -193,8 +192,14 @@ function initMap() {


$(document).on("click", ".applied-filter", function () { $(document).on("click", ".applied-filter", function () {
let field = $(this).attr("data-field"); let field = $(this).attr("data-field");
if (field == "ort") $("#ort").val(""); if (field == "ort") {
else if (field == "search") $("#search-input").val(""); $("#ort").val("");
$("#ort").trigger("change");
}
else if (field == "search") {
$("#search-input").val("");
$("#search-button").trigger("click");
}
else { else {
$(".check-filter[data-field='" + field + "'][name='filter-options']:checked").prop("checked", false); $(".check-filter[data-field='" + field + "'][name='filter-options']:checked").prop("checked", false);
$(".check-filter[data-field='" + field + "'][name='filter-options']").trigger("change"); $(".check-filter[data-field='" + field + "'][name='filter-options']").trigger("change");