In order to meet my client's request for a unique map feature on his web store, I am striving to achieve a display similar to the Google Store Locator library. The challenge lies in making the map not show any markers until a location search is initiated, at which point only 3 nearby stores should appear on the map. Subsequent searches should refresh the map with only these 3 closest stores displayed.
My attempts to modify the configuration and JavaScript files have been unsuccessful so far. While I managed to manipulate the list of stores using the provided code snippet:
first_time = false;
...
...
if(!first_time){
items_per_panel = 0;
first_time = true;
}else{
items_per_panel = 1;
} // if
I have hit a roadblock when it comes to hiding the markers. It seems that customizing the code responsible for displaying markers like this:
marker.setMap(this.getMap());
might be the solution, but I am unsure of how to proceed.