diff --git a/srcs/plugins/map_prof/map_prof_hooks.php b/srcs/plugins/map_prof/map_prof_hooks.php index 09e5b42..a92e69d 100644 --- a/srcs/plugins/map_prof/map_prof_hooks.php +++ b/srcs/plugins/map_prof/map_prof_hooks.php @@ -82,8 +82,8 @@ function mp_ljdp_map() { //mp_console_log($locations); $filters = mp_get_filters($events); - mp_console_log("php filters:"); - mp_console_log($filters); + //mp_console_log("php filters:"); + //mp_console_log($filters); $to_add = array( "locations" => $locations, diff --git a/srcs/plugins/map_prof/mp_create_div.php b/srcs/plugins/map_prof/mp_create_div.php index 32c7a34..f4b4ee3 100644 --- a/srcs/plugins/map_prof/mp_create_div.php +++ b/srcs/plugins/map_prof/mp_create_div.php @@ -17,7 +17,7 @@ function mp_create_div(&$filters) { '; foreach ($filter as $value) { $mp_map_div .= ' -
'.$value->_name.'
+'.$value->_name.'
'; } $mp_map_div .= ' diff --git a/srcs/plugins/map_prof/scripts/mp_filter_events.js b/srcs/plugins/map_prof/scripts/mp_filter_events.js index 8108329..7ac3e19 100644 --- a/srcs/plugins/map_prof/scripts/mp_filter_events.js +++ b/srcs/plugins/map_prof/scripts/mp_filter_events.js @@ -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); } diff --git a/srcs/plugins/map_prof/scripts/mp_init_map.js b/srcs/plugins/map_prof/scripts/mp_init_map.js index bd05dcb..152a9b7 100644 --- a/srcs/plugins/map_prof/scripts/mp_init_map.js +++ b/srcs/plugins/map_prof/scripts/mp_init_map.js @@ -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 ; }); }