Looping through a table and injecting google maps markers
First off, I am working with Drupal. I am new to jQuery and have used it for a few things on my site so far, but none has been as complicated as what I'm trying to do now. I am working on a website for a client that has a locator for all Federally Licensed Firearms dealers in the US. I have about 31,000 entries in my database. I have a proximity search that works well, you simply enter a zipcode and your nearby results populate in a table and a google map shows markers that correlate with the results. I am using several different Drupal modules to achieve this. If anyone wants to check out the locator go to
www.axtsweapons.com and login as username: "test" password:"1234" and then go to this direct link in the address bar:
www.axtsweapons.com/ffllocator. If you click on the on the pins that show up in the search you'll see that they match the list down below. But if you change the sort order of the list by clicking one of the appropriate column headers in the table you'll see that the markers don't update. I think the way to solve this is to drop the gmap module that I'm using and simply use the jQuery plugin gMap, or maybe just use the google maps API directly. But here is what I want to do and need help with, I want to have the map above the table like I have it now, but use jquery to loop through the table whenever it changes and look at the latitude and longitude columns in the table to put markers onto a map, and also to put the Business name and Address in info windows for each pin. It is the looping and pushing gathered data around that I am not familiar with. If someone could point me in the right direction and give me an opinion as to which way I should go for my google maps solution (should I use a jQuery plugin or just the API directly)? Thanks for any help. Let me know if I need to provide any more detailed information.