title: Google Maps API - Search XML Markers
body: <p>EDIT: <em>Just some background information - the system is set up using mySQL to store each marker's info, which is then converted into an XML file by some PHP code, which then displays it via the Maps javascript file. I currently have about 10 markers, which are stored in the mySQL database. Upon loading the map, all the markers are loaded.</em></p>
  
  <p>I am currently using the Maps API v3 to display markers, and to display their infoWindows in a div. That's all good so far.
  What I'd like to do it add a search functionality.
  From what I understand, the API does have a search function, but when I tried it on the example in the documentation, it did a search across the whole map. I want it to only search amongst my markers.
  EDIT: As I mentioned in the EDIT at the top, all markers are displayed at the initialize() - therefore, when someone searches for a location, the closest match would be selected. In the case of my map, the infowindow is displayed and split across 2 'html' sections, outside the map area (i.e., there is no bubble display on the actual map)</p>
  
  <p>EDIT: Initially, I was worried that someone would come along and copy my idea if I posted the URL, but I'm sure it's been done already! Scr*w it - <a href="http://sandbox.tristanbacon.me/citymap" rel="nofollow">CityMap Prototype</a></p>
  
  <p>So, I guess I'd need to find/create some sort of system that searches the XML file. Initially, the user would only be able to search for locations by name. Later, I'm sure I could come up with creative uses for the search.</p>
  
  <p>Can anyone point me in the right direction?</p>
  
  <p>EDIT:
  After posting this, I found a tutorial on W3C - <a href="http://www.w3schools.com/php/php_ajax_livesearch.asp" rel="nofollow">PHP Example - AJAX Live Search</a>. It searches for links from an XML file, and then displays them in the temporary search results under the bar, as you type. Does anyone know how I can link this search function to the markers?
  From what I can understand, I'd need to somehow link to each marker via XML, but that's the extent to my guess.</p>
  
  <p>Thanks</p>