Cleanest way to apply filter criteria to the map

rick28

New Member
I have a page which has a \[code\]Google Maps V3\[/code\] map and a HTML form with a "Filter" button. I also have this one big XML file that has complex structure with information about each marker that I will parse as html inside each marker's infobox.I'm able to read and generate the markers from the XML file and plot them on the map, but I can't wrap my head around filtering the markers on the map.What would be the cleanest way to filter markers on the map, after pressing "Filter" button, that will meet my filtering criteria specified with the HTML form on the page?My form has one listbox so far:\[code\]Company\[/code\] - based on what company name you select it should show all of its branches on the map. The XML file has all that information(branch address, lat, lng, phonenumber, comapny it belongs to).XML structure:\[code\]<markers> <marker> <company name="ComapnyName"> <branches> <branch> <address>BranchAddress</address> <phone>BranchAddress</phone> <products> <product> <name>ProductName</name> <url>ProductURL</url> </product> <product /> <product /> ... </products> </branch> <branch /> <branch /> ... </branches> </company> </marker> <marker /> <marker /> ...</markers>\[/code\]
 
Back
Top