May 8th, 2010, 10:19 AM
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
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