(May 8th, 2010, 10:19 AM)Ben Wrote: Hi Alex,
Cool! I'm actually working on something pretty similar right now - I'm adding a section to this site where people can say hello and say where they're using Form Tools. All Google Maps based. This is something I've been meaning to add for... ooh, 4 years?
The standard way to do it is have some Ajax code running on page load that calls a PHP page on your site. That PHP file queries the database and returns the info in XML or JSON format, which is then loaded into your map.
For the PHP side of things, you'll probably just want to use some custom SQL. I looked over the functions within the API & core code and they're all kind of custom. Plus you really want something fast that runs with no overhead - the existing functions do LOTS of stuff that you probably don't need. However, check out ft_search_submissions() (found in /global/code/submissions.php). It's pretty useful, but it requires figuring out what information to pass it as parameters.
Failing that, I'd stick with a simple SQL query to return those results you want.
Sorry I couldn't be more help. Good luck with it!
- Ben
Thanks Ben,
I think I understand what you are saying. I've been doing a bit of research, and that's pretty much what has been explained to me by everyone else.
Have you seen any existing Ajax code out there that does this? I'm pretty good at getting existing scripts working and adjusting them a bit to work with my needs, but starting from scratch is a little overwhelming! This google API stuff is not the easiest to understand though.
Keep me updated on what you get going, I'd be curious to see if I can make it work for my application!
Thanks again,
Alex