pass indexes array to js function

This commit is contained in:
lenovo
2022-11-11 18:36:04 +01:00
parent e255a36b29
commit 65df3e630d
4 changed files with 14 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
function mp_filter_selection(coordinates) {
function mp_filter_selection(indexes) {
/*
* following variable are created by mp_add_to_script.php
@@ -6,6 +6,6 @@ function mp_filter_selection(coordinates) {
*
*/
console.log(coordinates);
console.log(indexes);
// coordinates.setMap(map);
}

View File

@@ -15,6 +15,7 @@ function mp_init_map() {
* - filters: { - pays : [ { - _name : "" } ] }
* { [ { - villes : [] } ] }
* { [ { - categories: [] } ] }
* { [ { - indexes : [] } ] }
* { [ { - mode : [] }, ...] }
* { [ ] }
* { }
@@ -49,17 +50,17 @@ function mp_init_map() {
let marker_cluster = draw_clusters(map, markers);
//let toggle = true;
// add listener to close infowindow at any click on map
let toggle = true;
map.addListener('click', function() {
infowindow.close();
console.log(toggle);
//markers[index].setMap(null);
if (toggle === true)
marker_cluster.removeMarker(markers[25]);
else
marker_cluster.addMarker(markers[25]);
toggle = (toggle === true)? false : true ;
//console.log(toggle);
////markers[index].setMap(null);
//if (toggle === true)
// marker_cluster.removeMarker(markers[25]);
//else
// marker_cluster.addMarker(markers[25]);
//toggle = (toggle === true)? false : true ;
});
}