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

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