Reputation: 11
I have a couple of questions, and the first one involves the integration of a Google or Bing map. I am trying to get multiple markers to appear on a map based on the results of a user-submitted property search form. When the user searches for properties from any combination of available criteria (Address, city, Zip code, number of garages, etc.), they are taken to a results page that shows ten matches per page. The map needs to be able to mark the location of those properties as they are being viewed on the results page. How can this be accomplished in the scripting of the map and/or the search form?
My second question involves storing images on a database. We need to download a large number of images from a listing server, but unfortunately our server is not large enough to support easily tens of thousands of image files. How can the images be stored on a relational database with PHP and SQL queries? How can SQL be used to convert the actual images to data for easier storage? Thank you for any answers you have!
Upvotes: 1
Views: 319
Reputation: 8109
The basic workflow would be to query your database in a loop and output the address information together with their latitude and longitude to your HTML page. Then you would simply add multiple markers to your map and style the results, markers and infobubbles to your needs. A simple example on how to add a single marker can be found in the Google Maps API Documentation.
Are you sure you need to store the images itself in a database? Perhaps it is also possible to store them on a filesystem or on another location like Amazon S3. You may want to read this posting for a detailed discussion.
Upvotes: 1